diff --git a/src/multitasking/scheduler.c b/src/multitasking/scheduler.c index 97769a4..4770cb0 100644 --- a/src/multitasking/scheduler.c +++ b/src/multitasking/scheduler.c @@ -20,7 +20,7 @@ void scheduler(void) cli(); struct task *it = current_task->next; while (it && it->status != RUN) { - if (current_task->pid == 0 && func[it->status]) { + if (it != current_task && func[it->status]) { struct task *new_it = it->prev; func[it->status](it); it = new_it;