diff options
author | Bryan Ward <bcw@cs.unc.edu> | 2012-08-12 16:35:36 -0400 |
---|---|---|
committer | Bryan Ward <bcw@cs.unc.edu> | 2013-04-16 14:34:35 -0400 |
commit | 44123a1a3076503bef7666ffc3fdcb3f8e68e8da (patch) | |
tree | 4d6d41e315f8394f0970f24314cd6a569c56bdf7 /litmus/locking.c | |
parent | 30bb245b67c5be41a53203a5cc874e84985c528a (diff) |
DGLock and DGUnlock implementation.
These methods haven't been fully tested, but they compile and pass a few
simple tests.
Diffstat (limited to 'litmus/locking.c')
-rw-r--r-- | litmus/locking.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/litmus/locking.c b/litmus/locking.c index 55529064f7ca..65fd51f2c80a 100644 --- a/litmus/locking.c +++ b/litmus/locking.c | |||
@@ -169,6 +169,19 @@ struct task_struct* __waitqueue_remove_first(wait_queue_head_t *wq) | |||
169 | return(t); | 169 | return(t); |
170 | } | 170 | } |
171 | 171 | ||
172 | struct task_struct* __waitqueue_peek_first(wait_queue_head_t *wq) | ||
173 | { | ||
174 | wait_queue_t* q; | ||
175 | struct task_struct* t = NULL; | ||
176 | |||
177 | if (waitqueue_active(wq)) { | ||
178 | q = list_entry(wq->task_list.next, | ||
179 | wait_queue_t, task_list); | ||
180 | t = (struct task_struct*) q->private; | ||
181 | } | ||
182 | return(t); | ||
183 | } | ||
184 | |||
172 | unsigned int __add_wait_queue_prio_exclusive( | 185 | unsigned int __add_wait_queue_prio_exclusive( |
173 | wait_queue_head_t* head, | 186 | wait_queue_head_t* head, |
174 | prio_wait_queue_t *new) | 187 | prio_wait_queue_t *new) |