fix: infinite loop when only one task
This commit is contained in:
parent
540226fb0f
commit
d4db6acf61
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user