X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=kernel%2Fwait.c;h=444ddbfaefc490839e2cf913cb688c7ebb9f0df9;hb=f61534dfd38f895b203e2aadaba04f21a992ca8c;hp=791681cfea981d49e5b9f74de41f928c1c8da38b;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=safe%2Fjmp%2Flinux-2.6 diff --git a/kernel/wait.c b/kernel/wait.c index 791681c..444ddbf 100644 --- a/kernel/wait.c +++ b/kernel/wait.c @@ -3,7 +3,6 @@ * * (C) 2004 William Irwin, Oracle */ -#include #include #include #include @@ -11,6 +10,14 @@ #include #include +void init_waitqueue_head(wait_queue_head_t *q) +{ + spin_lock_init(&q->lock); + INIT_LIST_HEAD(&q->task_list); +} + +EXPORT_SYMBOL(init_waitqueue_head); + void fastcall add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait) { unsigned long flags; @@ -54,7 +61,7 @@ EXPORT_SYMBOL(remove_wait_queue); * The spin_unlock() itself is semi-permeable and only protects * one way (it only protects stuff inside the critical region and * stops them from bleeding out - it would still allow subsequent - * loads to move into the the critical region). + * loads to move into the critical region). */ void fastcall prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state)