[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080604170906.GA10276@tv-sign.ru>
Date: Wed, 4 Jun 2008 21:09:06 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>
Cc: Dmitry Adamushko <dmitry.adamushko@...il.com>,
Matthew Wilcox <matthew@....cx>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] __down_common: use signal_pending_state()
Cleanup. __down_common() can use the new signal_pending_state() helper.
Signed-off-by: Oleg Nesterov <oleg@...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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists