Rev 3482 | Rev 5270 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3482 | Rev 4292 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _LINUX_WAIT_H |
1 | #ifndef _LINUX_WAIT_H |
2 | #define _LINUX_WAIT_H |
2 | #define _LINUX_WAIT_H |
Line -... | Line 3... | ||
- | 3 | ||
3 | 4 | ||
4 | #include |
5 | #include |
Line 5... | Line 6... | ||
5 | #include |
6 | #include |
6 | 7 | ||
- | 8 | typedef struct __wait_queue wait_queue_t; |
|
Line 7... | Line 9... | ||
7 | typedef struct __wait_queue wait_queue_t; |
9 | typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key); |
Line 8... | Line 10... | ||
8 | typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key); |
10 | int default_wake_function(wait_queue_t *wait, unsigned mode, int flags, void *key); |
9 | 11 | ||
Line 19... | Line 21... | ||
19 | struct __wait_queue_head |
21 | struct __wait_queue_head |
20 | { |
22 | { |
21 | spinlock_t lock; |
23 | spinlock_t lock; |
22 | struct list_head task_list; |
24 | struct list_head task_list; |
23 | }; |
25 | }; |
- | 26 | static inline int waitqueue_active(wait_queue_head_t *q) |
|
- | 27 | { |
|
- | 28 | return !list_empty(&q->task_list); |
|
- | 29 | } |
|
Line 24... | Line 30... | ||
24 | 30 | ||
25 | static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) |
31 | static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) |
26 | { |
32 | { |
27 | list_add(&new->task_list, &head->task_list); |
33 | list_add(&new->task_list, &head->task_list); |