aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-08-20 19:54:41 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-22 09:17:28 -0400
commit94d3d8247de22c5b0624aa00616ceca459498e55 (patch)
treea01dedc8fb47010b27107c0a13ef0e926cc82589 /kernel/sched.c
parentf58e2c33ffa31b8d4a71609a5e71e8d893574a07 (diff)
sched: do_wait_for_common: use signal_pending_state()
Change do_wait_for_common() to use signal_pending_state() instead of open coding. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d601fb0406ca..da7c5d23cc03 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4599,10 +4599,7 @@ do_wait_for_common(struct completion *x, long timeout, int state)
4599 wait.flags |= WQ_FLAG_EXCLUSIVE; 4599 wait.flags |= WQ_FLAG_EXCLUSIVE;
4600 __add_wait_queue_tail(&x->wait, &wait); 4600 __add_wait_queue_tail(&x->wait, &wait);
4601 do { 4601 do {
4602 if ((state == TASK_INTERRUPTIBLE && 4602 if (signal_pending_state(state, current)) {
4603 signal_pending(current)) ||
4604 (state == TASK_KILLABLE &&
4605 fatal_signal_pending(current))) {
4606 timeout = -ERESTARTSYS; 4603 timeout = -ERESTARTSYS;
4607 break; 4604 break;
4608 } 4605 }