Messages in this thread Patch in this message | | | Subject | [patch 3/8] kernel/sched.c: fix subtle TASK_RUNNING compare | From | janitor@sternwel ... | Date | Sat, 20 Nov 2004 03:29:33 +0100 |
| |
Hi.
This test was depending on TASK_RUNNING being defined as 0.
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at> ---
linux-2.6.10-rc2-bk4-max/kernel/sched.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
diff -puN kernel/sched.c~fix-test-kernel_sched kernel/sched.c --- linux-2.6.10-rc2-bk4/kernel/sched.c~fix-test-kernel_sched 2004-11-20 03:04:46.000000000 +0100 +++ linux-2.6.10-rc2-bk4-max/kernel/sched.c 2004-11-20 03:04:46.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)))) _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |