Wed, 15 May 2013 06:53:12 -0700 Post Comments
This changes the behaviour of the idle loop from using the WFI to
just spinning instead with no wait-for-interrupt or anything else.
We just keep reading the need_resched flag.
That's much better than the commented out code which opens a mighty
big race condition which will then give bad scheduling behaviour,
allowing the idle task to sleep in WFI until the next interrupt while
the need_resched flag may be set.
Sure, there's better ways to do this, via the disable_hlt() stuff,
and whatever its replacement implementation is now called. But
ultimately this workaround really is about "doing nothing" when