diff options
Diffstat (limited to 'litmus/locking.c')
-rw-r--r-- | litmus/locking.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/litmus/locking.c b/litmus/locking.c index 728b56835cf7..2693f1aca859 100644 --- a/litmus/locking.c +++ b/litmus/locking.c | |||
@@ -107,16 +107,18 @@ asmlinkage long sys_litmus_unlock(int lock_od) | |||
107 | return err; | 107 | return err; |
108 | } | 108 | } |
109 | 109 | ||
110 | struct task_struct* waitqueue_first(wait_queue_head_t *wq) | 110 | struct task_struct* __waitqueue_remove_first(wait_queue_head_t *wq) |
111 | { | 111 | { |
112 | wait_queue_t *q; | 112 | wait_queue_t* q; |
113 | struct task_struct* t = NULL; | ||
113 | 114 | ||
114 | if (waitqueue_active(wq)) { | 115 | if (waitqueue_active(wq)) { |
115 | q = list_entry(wq->task_list.next, | 116 | q = list_entry(wq->task_list.next, |
116 | wait_queue_t, task_list); | 117 | wait_queue_t, task_list); |
117 | return (struct task_struct*) q->private; | 118 | t = (struct task_struct*) q->private; |
118 | } else | 119 | __remove_wait_queue(wq, q); |
119 | return NULL; | 120 | } |
121 | return(t); | ||
120 | } | 122 | } |
121 | 123 | ||
122 | 124 | ||