Rev 5056 | Rev 6125 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5056 | Rev 5270 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _LINUX_WAIT_H |
1 | #ifndef _LINUX_WAIT_H |
2 | #define _LINUX_WAIT_H |
2 | #define _LINUX_WAIT_H |
- | 3 | /* |
|
- | 4 | * Linux wait queue related types and methods |
|
- | 5 | */ |
|
- | 6 | #include |
|
- | 7 | #include |
|
- | 8 | #include |
|
- | 9 | #include |
|
- | 10 | ||
Line 3... | Line -... | ||
3 | - | ||
4 | 11 | ||
Line 5... | Line 12... | ||
5 | #include |
12 | |
6 | #include |
13 | #include |
7 | 14 | ||
Line 26... | Line 33... | ||
26 | static inline int waitqueue_active(wait_queue_head_t *q) |
33 | static inline int waitqueue_active(wait_queue_head_t *q) |
27 | { |
34 | { |
28 | return !list_empty(&q->task_list); |
35 | return !list_empty(&q->task_list); |
29 | } |
36 | } |
Line -... | Line 37... | ||
- | 37 | ||
- | 38 | extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); |
|
- | 39 | extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait); |
|
- | 40 | extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); |
|
30 | 41 | ||
31 | static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) |
42 | static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) |
32 | { |
43 | { |
33 | list_add(&new->task_list, &head->task_list); |
44 | list_add(&new->task_list, &head->task_list); |
Line 143... | Line 154... | ||
143 | spin_lock_init(&q->lock); |
154 | spin_lock_init(&q->lock); |
144 | INIT_LIST_HEAD(&q->task_list); |
155 | INIT_LIST_HEAD(&q->task_list); |
145 | }; |
156 | }; |
Line 146... | Line 157... | ||
146 | 157 | ||
147 | 158 | ||
148 | struct completion { |
159 | //struct completion { |
149 | unsigned int done; |
160 | // unsigned int done; |
Line 150... | Line 161... | ||
150 | wait_queue_head_t wait; |
161 | // wait_queue_head_t wait; |
Line 151... | Line 162... | ||
151 | }; |
162 | //}; |