mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] do_wait_for_common: use signal_pending_state()
@ 2008-07-24 16:34 Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2008-07-24 16:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ingo Molnar, Matthew Wilcox, Roland McGrath, linux-kernel

Change do_wait_for_common() to use signal_pending_state() instead of
open coding.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 26-rc2/kernel/sched.c~1_SPS_WAIT_FOR	2008-07-22 18:36:58.000000000 +0400
+++ 26-rc2/kernel/sched.c	2008-07-24 19:54:12.000000000 +0400
@@ -4735,10 +4735,7 @@ do_wait_for_common(struct completion *x,
 		wait.flags |= WQ_FLAG_EXCLUSIVE;
 		__add_wait_queue_tail(&x->wait, &wait);
 		do {
-			if ((state == TASK_INTERRUPTIBLE &&
-			     signal_pending(current)) ||
-			    (state == TASK_KILLABLE &&
-			     fatal_signal_pending(current))) {
+			if (signal_pending_state(state, current)) {
 				timeout = -ERESTARTSYS;
 				break;
 			}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-24 16:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-24 16:34 [PATCH] do_wait_for_common: use signal_pending_state() Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®