to schedule() or not to schedule() ?

Arnd Bergmann arnd at arndb.de
Thu Aug 7 07:12:10 EST 2008


On Wednesday 06 August 2008, Kevin Diggs wrote:
> For the purpose of learning, there is no direct, correct way to yield 
> the cpu when in a timer fired routine, right?
> 

No, in a timer, you interrupt a totally unrelated thread, so sleeping
would prevent that from running on, as well as preventing other timers
from being run, so it's not an option.

One thing that might work for you would be to re-arm the existing
timer and return from your function, so you get back to it after
a short while.

	Arnd <><



More information about the Linuxppc-dev mailing list