Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156727
b: refs/heads/master
c: 2fc3911
h: refs/heads/master
i:
  156725: 1d6614c
  156723: 839bea8
  156719: 23abbe1
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Aug 10, 2009
1 parent 3ba9f02 commit ea2728f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: beda2c7ea2c15ed01eef00a997d2b0496c3a502d
refs/heads/master: 2fc391112fb6f3424435a3aa2fda887497b5f807
9 changes: 8 additions & 1 deletion trunk/include/linux/wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ struct task_struct;
#define __WAIT_BIT_KEY_INITIALIZER(word, bit) \
{ .flags = word, .bit_nr = bit, }

extern void init_waitqueue_head(wait_queue_head_t *q);
extern void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *);

#define init_waitqueue_head(q) \
do { \
static struct lock_class_key __key; \
\
__init_waitqueue_head((q), &__key); \
} while (0)

#ifdef CONFIG_LOCKDEP
# define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \
Expand Down
5 changes: 3 additions & 2 deletions trunk/kernel/wait.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
#include <linux/wait.h>
#include <linux/hash.h>

void init_waitqueue_head(wait_queue_head_t *q)
void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *key)
{
spin_lock_init(&q->lock);
lockdep_set_class(&q->lock, key);
INIT_LIST_HEAD(&q->task_list);
}

EXPORT_SYMBOL(init_waitqueue_head);
EXPORT_SYMBOL(__init_waitqueue_head);

void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
{
Expand Down

0 comments on commit ea2728f

Please sign in to comment.