-
- Downloads
sched: add idle thread
Previously, we performed idle processing in the scheduler, in the context of the thread that is being scheudled out. This makes preemption more complicated, since every thread can potentially be in the idle loop simultaneously, having been preempted there some time in the past. Obviously we can't disable interrupts in the idle loop. Move idle processing to its own thread to fix this problem. This is currently sub-optimal since we don't have priority classes yet (or even just priorities), so the idle thread can be scheduled before workload threads. If that happens it will examine the runqueue and yield if there's anything there.
Loading
Please register or sign in to comment