diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-13 03:44:22 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-13 03:44:22 -0500 |
commit | f8a6b2b9cee298a9663cbe38ce1eb5240987cb62 (patch) | |
tree | b356490269c9e77d164dcc1477792b882fbb8bdb /include/linux/wait.h | |
parent | ba1511bf7fbda452138e4096bf10d5a382710f4f (diff) | |
parent | 071a0bc2ceace31266836801510879407a3701fa (diff) |
Merge branch 'linus' into x86/apic
Conflicts:
arch/x86/kernel/acpi/boot.c
arch/x86/mm/fault.c
Diffstat (limited to 'include/linux/wait.h')
-rw-r--r-- | include/linux/wait.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index ef609f842fac..a210ede73b56 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -132,6 +132,8 @@ static inline void __remove_wait_queue(wait_queue_head_t *head, | |||
132 | list_del(&old->task_list); | 132 | list_del(&old->task_list); |
133 | } | 133 | } |
134 | 134 | ||
135 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, | ||
136 | int nr_exclusive, int sync, void *key); | ||
135 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); | 137 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
136 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); | 138 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); |
137 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); | 139 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); |
@@ -333,16 +335,19 @@ do { \ | |||
333 | for (;;) { \ | 335 | for (;;) { \ |
334 | prepare_to_wait_exclusive(&wq, &__wait, \ | 336 | prepare_to_wait_exclusive(&wq, &__wait, \ |
335 | TASK_INTERRUPTIBLE); \ | 337 | TASK_INTERRUPTIBLE); \ |
336 | if (condition) \ | 338 | if (condition) { \ |
339 | finish_wait(&wq, &__wait); \ | ||
337 | break; \ | 340 | break; \ |
341 | } \ | ||
338 | if (!signal_pending(current)) { \ | 342 | if (!signal_pending(current)) { \ |
339 | schedule(); \ | 343 | schedule(); \ |
340 | continue; \ | 344 | continue; \ |
341 | } \ | 345 | } \ |
342 | ret = -ERESTARTSYS; \ | 346 | ret = -ERESTARTSYS; \ |
347 | abort_exclusive_wait(&wq, &__wait, \ | ||
348 | TASK_INTERRUPTIBLE, NULL); \ | ||
343 | break; \ | 349 | break; \ |
344 | } \ | 350 | } \ |
345 | finish_wait(&wq, &__wait); \ | ||
346 | } while (0) | 351 | } while (0) |
347 | 352 | ||
348 | #define wait_event_interruptible_exclusive(wq, condition) \ | 353 | #define wait_event_interruptible_exclusive(wq, condition) \ |
@@ -431,6 +436,8 @@ extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, | |||
431 | void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); | 436 | void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); |
432 | void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); | 437 | void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); |
433 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); | 438 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); |
439 | void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | ||
440 | unsigned int mode, void *key); | ||
434 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 441 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
435 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 442 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
436 | 443 | ||