1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 22:25:07 +00:00

Kernel: Make sure we never put the colonel thread in the runnable list.

This would cause it to get scheduled unnecessarily.
This commit is contained in:
Andreas Kling 2019-05-18 20:24:55 +02:00
parent 64a4f3df69
commit 7900da9667
2 changed files with 6 additions and 1 deletions

View file

@ -232,6 +232,9 @@ bool Scheduler::pick_next()
}
#endif
if (g_runnable_threads->is_empty())
return context_switch(s_colonel_process->main_thread());
auto* previous_head = g_runnable_threads->head();
for (;;) {
// Move head to tail.