diff options
Diffstat (limited to 'include/linux/wait.h')
-rw-r--r-- | include/linux/wait.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index 67d4e89b62d6..6788e1a4d4ca 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -438,13 +438,15 @@ void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, | |||
438 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 438 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
439 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | 439 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
440 | 440 | ||
441 | #define DEFINE_WAIT(name) \ | 441 | #define DEFINE_WAIT_FUNC(name, function) \ |
442 | wait_queue_t name = { \ | 442 | wait_queue_t name = { \ |
443 | .private = current, \ | 443 | .private = current, \ |
444 | .func = autoremove_wake_function, \ | 444 | .func = function, \ |
445 | .task_list = LIST_HEAD_INIT((name).task_list), \ | 445 | .task_list = LIST_HEAD_INIT((name).task_list), \ |
446 | } | 446 | } |
447 | 447 | ||
448 | #define DEFINE_WAIT(name) DEFINE_WAIT_FUNC(name, autoremove_wake_function) | ||
449 | |||
448 | #define DEFINE_WAIT_BIT(name, word, bit) \ | 450 | #define DEFINE_WAIT_BIT(name, word, bit) \ |
449 | struct wait_bit_queue name = { \ | 451 | struct wait_bit_queue name = { \ |
450 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ | 452 | .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \ |