[PATCH] 2.5.27 wait

Marcin Dalecki (dalecki@evision.ag)
Mon, 22 Jul 2002 12:51:21 +0200


This is a multi-part message in MIME format.
--------------070401060900010707070900
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

- Struct initializers are in C now.
- Remove unused add_wait_queue_cond() macro.

--------------070401060900010707070900
Content-Type: text/plain;
name="wait-2.5.27.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="wait-2.5.27.diff"

diff -urN linux-2.5.27/include/linux/wait.h linux/include/linux/wait.h
--- linux-2.5.27/include/linux/wait.h 2002-07-20 21:11:04.000000000 +0200
+++ linux/include/linux/wait.h 2002-07-22 00:02:30.000000000 +0200
@@ -43,16 +43,16 @@
*/

#define __WAITQUEUE_INITIALIZER(name, tsk) { \
- task: tsk, \
- func: default_wake_function, \
- task_list: { NULL, NULL } }
+ .task = tsk, \
+ .func = default_wake_function, \
+ .task_list = { NULL, NULL } }

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

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

#define DECLARE_WAIT_QUEUE_HEAD(name) \
wait_queue_head_t name = __WAIT_QUEUE_HEAD_INITIALIZER(name)
@@ -103,22 +103,6 @@
list_del(&old->task_list);
}

-#define add_wait_queue_cond(q, wait, cond) \
- ({ \
- unsigned long flags; \
- int _raced = 0; \
- spin_lock_irqsave(&(q)->lock, flags); \
- (wait)->flags = 0; \
- __add_wait_queue((q), (wait)); \
- rmb(); \
- if (!(cond)) { \
- _raced = 1; \
- __remove_wait_queue((q), (wait)); \
- } \
- spin_lock_irqrestore(&(q)->lock, flags); \
- _raced; \
- })
-
#endif /* __KERNEL__ */

#endif

--------------070401060900010707070900--

-
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/