public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] __down_common: use signal_pending_state()
@ 2008-06-04 17:09 Oleg Nesterov
  2008-06-04 17:36 ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Nesterov @ 2008-06-04 17:09 UTC (permalink / raw)
  To: Andrew Morton, Ingo Molnar
  Cc: Dmitry Adamushko, Matthew Wilcox, Peter Zijlstra, Roland McGrath,
	linux-kernel

Cleanup. __down_common() can use the new signal_pending_state() helper.

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

--- 26-rc2/kernel/semaphore.c~2_SEM_USE_HELPER	2008-05-18 15:44:19.000000000 +0400
+++ 26-rc2/kernel/semaphore.c	2008-06-04 20:45:21.000000000 +0400
@@ -211,9 +211,7 @@ static inline int __sched __down_common(
 	waiter.up = 0;
 
 	for (;;) {
-		if (state == TASK_INTERRUPTIBLE && signal_pending(task))
-			goto interrupted;
-		if (state == TASK_KILLABLE && fatal_signal_pending(task))
+		if (signal_pending_state(state, task))
 			goto interrupted;
 		if (timeout <= 0)
 			goto timed_out;


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-09 13:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-04 17:09 [PATCH 2/2] __down_common: use signal_pending_state() Oleg Nesterov
2008-06-04 17:36 ` Matthew Wilcox
2008-06-04 18:08   ` Oleg Nesterov
2008-06-04 19:54     ` Matthew Wilcox
2008-06-09 13:20   ` Ingo Molnar

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