[PATCH -rt 2/2] Fix condition in default_idle

From: Steven Rostedt
Date: Fri May 26 2006 - 12:10:50 EST


The condition statement in default_idle had the conjunctions backwards.
Instead of && it had || so the idle thread would never be preempted.

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

Index: linux-2.6.16-rt23/arch/x86_64/kernel/process.c
===================================================================
--- linux-2.6.16-rt23.orig/arch/x86_64/kernel/process.c 2006-05-26 10:41:30.000000000 -0400
+++ linux-2.6.16-rt23/arch/x86_64/kernel/process.c 2006-05-26 10:41:44.000000000 -0400
@@ -120,9 +120,9 @@ void default_idle(void)

clear_thread_flag(TIF_POLLING_NRFLAG);
smp_mb__after_clear_bit();
- while (!need_resched() || !need_resched_delayed()) {
+ while (!need_resched() && !need_resched_delayed()) {
local_irq_disable();
- if (!need_resched() || !need_resched_delayed())
+ if (!need_resched() && !need_resched_delayed())
safe_halt();
else
local_irq_enable();

--
-
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/