* [KJ] [patch] kernel/sched.c: fix subtle TASK_RUNNING compare
@ 2004-11-18 13:54 Domen Puncer
0 siblings, 0 replies; only message in thread
From: Domen Puncer @ 2004-11-18 13:54 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
Hi.
This test was depending on TASK_RUNNING being defined as 0.
Signed-off-by: Domen Puncer <domen@coderock.org>
--- c/kernel/sched.c 2004-11-15 13:42:20.000000000 +0100
+++ a/kernel/sched.c 2004-11-18 14:47:23.000000000 +0100
@@ -2576,7 +2576,8 @@ need_resched_nonpreemptible:
* to picking the next task.
*/
switch_count = &prev->nivcsw;
- if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
+ if (prev->state != TASK_RUNNING &&
+ !(preempt_count() & PREEMPT_ACTIVE)) {
switch_count = &prev->nvcsw;
if (unlikely((prev->state & TASK_INTERRUPTIBLE) &&
unlikely(signal_pending(prev))))
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-11-18 13:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-18 13:54 [KJ] [patch] kernel/sched.c: fix subtle TASK_RUNNING compare Domen Puncer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).