X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=include%2Flinux%2Fwait.h;h=794be7af58aeff2191059ab350b1b258ea597a03;hp=d38c9fecdc368450d00a4e5602944b0288a2c64b;hb=51bece910d2b0aca64cd3dee9fa2a8aa7feeadd9;hpb=38b22b6e9f46ab8f73ef5734f0e0a000766a9258 diff --git a/include/linux/wait.h b/include/linux/wait.h index d38c9fecdc36..794be7af58ae 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -19,7 +19,6 @@ #ifdef __KERNEL__ -#include #include #include #include @@ -54,6 +53,7 @@ struct __wait_queue_head { }; typedef struct __wait_queue_head wait_queue_head_t; +struct task_struct; /* * Macros for declaration and initialisaton of the datatypes @@ -68,7 +68,7 @@ typedef struct __wait_queue_head wait_queue_head_t; wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk) #define __WAIT_QUEUE_HEAD_INITIALIZER(name) { \ - .lock = SPIN_LOCK_UNLOCKED, \ + .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ .task_list = { &(name).task_list, &(name).task_list } } #define DECLARE_WAIT_QUEUE_HEAD(name) \ @@ -77,9 +77,15 @@ typedef struct __wait_queue_head wait_queue_head_t; #define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ { .flags = word, .bit_nr = bit, } +/* + * lockdep: we want one lock-class for all waitqueue locks. + */ +extern struct lock_class_key waitqueue_lock_key; + static inline void init_waitqueue_head(wait_queue_head_t *q) { spin_lock_init(&q->lock); + lockdep_set_class(&q->lock, &waitqueue_lock_key); INIT_LIST_HEAD(&q->task_list); }