fix: infinite loop when only one task

This commit is contained in:
Starnakin 2025-01-23 14:26:44 +01:00
parent 540226fb0f
commit d4db6acf61

View File

@ -10,7 +10,7 @@ void scheduler(void)
if (!current_task)
return;
struct task *it = current_task->next;
while (it && it->status != RUN)
while (it && it->next != it && it->status != RUN)
it = it->next;
switch_to_task(it);
}