diff options
| -rw-r--r-- | kernel/async.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/async.c b/kernel/async.c index 29d51d483bee..a4c1a9e63b2e 100644 --- a/kernel/async.c +++ b/kernel/async.c | |||
| @@ -61,7 +61,8 @@ asynchronous and synchronous parts of the kernel. | |||
| 61 | 61 | ||
| 62 | static async_cookie_t next_cookie = 1; | 62 | static async_cookie_t next_cookie = 1; |
| 63 | 63 | ||
| 64 | #define MAX_WORK 32768 | 64 | #define MAX_WORK 32768 |
| 65 | #define ASYNC_COOKIE_MAX ULLONG_MAX /* infinity cookie */ | ||
| 65 | 66 | ||
| 66 | static LIST_HEAD(async_pending); | 67 | static LIST_HEAD(async_pending); |
| 67 | static ASYNC_DOMAIN(async_dfl_domain); | 68 | static ASYNC_DOMAIN(async_dfl_domain); |
| @@ -88,8 +89,8 @@ static atomic_t entry_count; | |||
| 88 | */ | 89 | */ |
| 89 | static async_cookie_t __lowest_in_progress(struct async_domain *domain) | 90 | static async_cookie_t __lowest_in_progress(struct async_domain *domain) |
| 90 | { | 91 | { |
| 91 | async_cookie_t first_running = next_cookie; /* infinity value */ | 92 | async_cookie_t first_running = ASYNC_COOKIE_MAX; |
| 92 | async_cookie_t first_pending = next_cookie; /* ditto */ | 93 | async_cookie_t first_pending = ASYNC_COOKIE_MAX; |
| 93 | struct async_entry *entry; | 94 | struct async_entry *entry; |
| 94 | 95 | ||
| 95 | /* | 96 | /* |
| @@ -269,7 +270,7 @@ void async_synchronize_full(void) | |||
| 269 | domain = list_first_entry(&async_domains, typeof(*domain), node); | 270 | domain = list_first_entry(&async_domains, typeof(*domain), node); |
| 270 | spin_unlock_irq(&async_lock); | 271 | spin_unlock_irq(&async_lock); |
| 271 | 272 | ||
| 272 | async_synchronize_cookie_domain(next_cookie, domain); | 273 | async_synchronize_cookie_domain(ASYNC_COOKIE_MAX, domain); |
| 273 | } while (!list_empty(&async_domains)); | 274 | } while (!list_empty(&async_domains)); |
| 274 | mutex_unlock(&async_register_mutex); | 275 | mutex_unlock(&async_register_mutex); |
| 275 | } | 276 | } |
| @@ -305,7 +306,7 @@ EXPORT_SYMBOL_GPL(async_unregister_domain); | |||
| 305 | */ | 306 | */ |
| 306 | void async_synchronize_full_domain(struct async_domain *domain) | 307 | void async_synchronize_full_domain(struct async_domain *domain) |
| 307 | { | 308 | { |
| 308 | async_synchronize_cookie_domain(next_cookie, domain); | 309 | async_synchronize_cookie_domain(ASYNC_COOKIE_MAX, domain); |
| 309 | } | 310 | } |
| 310 | EXPORT_SYMBOL_GPL(async_synchronize_full_domain); | 311 | EXPORT_SYMBOL_GPL(async_synchronize_full_domain); |
| 311 | 312 | ||
