static async_cookie_t next_cookie = 1;
-#define MAX_WORK 32768
+#define MAX_WORK 32768
+#define ASYNC_COOKIE_MAX ULLONG_MAX /* infinity cookie */
static LIST_HEAD(async_pending);
static ASYNC_DOMAIN(async_dfl_domain);
*/
static async_cookie_t __lowest_in_progress(struct async_domain *domain)
{
- async_cookie_t first_running = next_cookie; /* infinity value */
- async_cookie_t first_pending = next_cookie; /* ditto */
+ async_cookie_t first_running = ASYNC_COOKIE_MAX;
+ async_cookie_t first_pending = ASYNC_COOKIE_MAX;
struct async_entry *entry;
/*
domain = list_first_entry(&async_domains, typeof(*domain), node);
spin_unlock_irq(&async_lock);
- async_synchronize_cookie_domain(next_cookie, domain);
+ async_synchronize_cookie_domain(ASYNC_COOKIE_MAX, domain);
} while (!list_empty(&async_domains));
mutex_unlock(&async_register_mutex);
}
*/
void async_synchronize_full_domain(struct async_domain *domain)
{
- async_synchronize_cookie_domain(next_cookie, domain);
+ async_synchronize_cookie_domain(ASYNC_COOKIE_MAX, domain);
}
EXPORT_SYMBOL_GPL(async_synchronize_full_domain);