patch-2.1.57 linux/kernel/sched.c

Next file: linux/kernel/sys.c
Previous file: linux/kernel/printk.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.56/linux/kernel/sched.c linux/kernel/sched.c
@@ -400,7 +400,7 @@
 	timeout = 0;
 	switch (prev->state) {
 		case TASK_INTERRUPTIBLE:
-			if (prev->signal & ~prev->blocked)
+			if (signal_pending(prev))
 				goto makerunnable;
 			timeout = prev->timeout;
 			if (timeout && (timeout <= jiffies)) {
@@ -623,9 +623,7 @@
 		if (waking_non_zero(sem))	/* are we waking up?  */
 			break;			/* yes, exit loop */
 
-		if (   task_state == TASK_INTERRUPTIBLE
-		    && (tsk->signal & ~tsk->blocked)	/* signalled */
-		   ) {
+		if (task_state == TASK_INTERRUPTIBLE && signal_pending(tsk)) {
 			ret = -EINTR;			/* interrupted */
 			atomic_inc(&sem->count);	/* give up on down operation */
 			break;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov