Import 2.1.42pre1
[davej-history.git] / include / linux / wait.h
blob0a0d11fc9b69389f1dfa401a20958db3b96f0676
1 #ifndef _LINUX_WAIT_H
2 #define _LINUX_WAIT_H
4 #define WNOHANG 0x00000001
5 #define WUNTRACED 0x00000002
7 #define __WCLONE 0x80000000
9 #ifdef __KERNEL__
11 #include <asm/page.h>
13 struct wait_queue {
14 struct task_struct * task;
15 struct wait_queue * next;
18 #define WAIT_QUEUE_HEAD(x) ((struct wait_queue *)((x)-1))
20 static inline void init_waitqueue(struct wait_queue **q)
22 *q = WAIT_QUEUE_HEAD(q);
25 static inline int waitqueue_active(struct wait_queue **q)
27 struct wait_queue *head = *q;
28 return head && head != WAIT_QUEUE_HEAD(q);
31 struct poll_table_entry {
32 struct wait_queue wait;
33 struct wait_queue ** wait_address;
36 typedef struct poll_table_struct {
37 unsigned int nr;
38 struct poll_table_entry * entry;
39 } poll_table;
41 #define __MAX_POLL_TABLE_ENTRIES (PAGE_SIZE / sizeof (struct poll_table_entry))
43 #endif /* __KERNEL__ */
45 #endif