fix: do not edit task if it's the current

This commit is contained in:
Starnakin 2025-02-07 11:29:39 +01:00
parent 3766464c47
commit 1e981755de

View File

@ -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;