[PATCH] wait.h cleanup

Matti Annala (gval@mbnet.fi)
Sat, 16 Nov 2002 11:22:26 +0200


The patch below slightly cleans up the waitqueue initialization macros and
removes a useless comment from the header (the macro names are clear enough).

Comments?

--------------------------------------------------------------------------------

diff -ur linux-2.5.47/include/linux/wait.h difflinux/include/linux/wait.h
--- linux-2.5.47/include/linux/wait.h 2002-11-05 00:30:31.000000000 +0200
+++ difflinux/include/linux/wait.h 2002-11-14 09:40:37.000000000 +0200
@@ -37,21 +37,16 @@
};
typedef struct __wait_queue_head wait_queue_head_t;

-
-/*
- * Macros for declaration and initialisaton of the datatypes
- */
-
-#define __WAITQUEUE_INITIALIZER(name, tsk) { \
+#define __WAITQUEUE_INITIALIZER(tsk) { \
.task = tsk, \
- .func = default_wake_function, \
+ .func = default_wake_function, \
.task_list = { NULL, NULL } }

-#define DECLARE_WAITQUEUE(name, tsk) \
- wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk)
+#define DECLARE_WAITQUEUE(name, tsk) \
+ wait_queue_t name = __WAITQUEUE_INITIALIZER(tsk)

-#define __WAIT_QUEUE_HEAD_INITIALIZER(name) { \
- .lock = SPIN_LOCK_UNLOCKED, \
+#define __WAIT_QUEUE_HEAD_INITIALIZER(name) { \
+ .lock = SPIN_LOCK_UNLOCKED, \
.task_list = { &(name).task_list, &(name).task_list } }

#define DECLARE_WAIT_QUEUE_HEAD(name) \

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/