* [PATCH] sched: use wrapper functions
@ 2010-04-28 3:43 Changli Gao
0 siblings, 0 replies; only message in thread
From: Changli Gao @ 2010-04-28 3:43 UTC (permalink / raw)
To: Ingo Molnar
Cc: Peter Zijlstra, Andreas Herrmann, Thomas Gleixner,
Mike Galbraith, linux-kernel, Changli Gao
use wrapper functions.
Since there are add_wait_queue_exclusive_locked() and remove_wait_queue_locked()
, we'd better use them instead.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
kernel/sched.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 6af210a..be5ab70 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4039,8 +4039,7 @@ do_wait_for_common(struct completion *x, long timeout, int state)
if (!x->done) {
DECLARE_WAITQUEUE(wait, current);
- wait.flags |= WQ_FLAG_EXCLUSIVE;
- __add_wait_queue_tail(&x->wait, &wait);
+ add_wait_queue_exclusive_locked(&x->wait, &wait);
do {
if (signal_pending_state(state, current)) {
timeout = -ERESTARTSYS;
@@ -4051,7 +4050,7 @@ do_wait_for_common(struct completion *x, long timeout, int state)
timeout = schedule_timeout(timeout);
spin_lock_irq(&x->wait.lock);
} while (!x->done && timeout);
- __remove_wait_queue(&x->wait, &wait);
+ remove_wait_queue_locked(&x->wait, &wait);
if (!x->done)
return timeout;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-28 4:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-28 3:43 [PATCH] sched: use wrapper functions Changli Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome