patch-2.0.16 linux/include/linux/wait.h
Next file: linux/init/main.c
Previous file: linux/include/linux/soundcard.h
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Sat Aug 31 16:38:17 1996
- Orig file:
v2.0.15/linux/include/linux/wait.h
- Orig date:
Tue Jul 19 13:10:15 1994
diff -u --recursive --new-file v2.0.15/linux/include/linux/wait.h linux/include/linux/wait.h
@@ -13,6 +13,19 @@
struct wait_queue * next;
};
+#define WAIT_QUEUE_HEAD(x) ((struct wait_queue *)((x)-1))
+
+static inline void init_waitqueue(struct wait_queue **q)
+{
+ *q = WAIT_QUEUE_HEAD(q);
+}
+
+static inline int waitqueue_active(struct wait_queue **q)
+{
+ struct wait_queue *head = *q;
+ return head && head != WAIT_QUEUE_HEAD(q);
+}
+
struct semaphore {
int count;
struct wait_queue * wait;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov