diff options
Diffstat (limited to 'include/linux/wait.h')
| -rw-r--r-- | include/linux/wait.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index b3b9048421d8..e820d00e1383 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -79,6 +79,15 @@ struct task_struct; | |||
| 79 | 79 | ||
| 80 | extern void init_waitqueue_head(wait_queue_head_t *q); | 80 | extern void init_waitqueue_head(wait_queue_head_t *q); |
| 81 | 81 | ||
| 82 | #ifdef CONFIG_LOCKDEP | ||
| 83 | # define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \ | ||
| 84 | ({ init_waitqueue_head(&name); name; }) | ||
| 85 | # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) \ | ||
| 86 | wait_queue_head_t name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) | ||
| 87 | #else | ||
| 88 | # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) DECLARE_WAIT_QUEUE_HEAD(name) | ||
| 89 | #endif | ||
| 90 | |||
| 82 | static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) | 91 | static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) |
| 83 | { | 92 | { |
| 84 | q->flags = 0; | 93 | q->flags = 0; |
