Re: [patch 3/8] kernel/sched.c: fix subtle TASK_RUNNING compare

From: Ingo Molnar
Date: Sat Nov 20 2004 - 06:55:57 EST



* janitor@xxxxxxxxxxxxxx <janitor@xxxxxxxxxxxxxx> wrote:

> switch_count = &prev->nivcsw;
> - if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
> + if (prev->state != TASK_RUNNING &&
> + !(preempt_count() & PREEMPT_ACTIVE)) {
> switch_count = &prev->nvcsw;

nack. We inherently rely on the process state mask being a bitmask and
TASK_RUNNING thus being zero.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/