lkml.org 
[lkml]   [2008]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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@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;


\
 
 \ /
  Last update: 2008-06-04 19:11    [W:0.046 / U:1.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site