diff --git a/src/multitasking/scheduler.c b/src/multitasking/scheduler.c index f1e5682..674c5d9 100644 --- a/src/multitasking/scheduler.c +++ b/src/multitasking/scheduler.c @@ -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); }