Skip to content

Commit 90422c2

Browse files
scheduler: switch to idle task when no the only task is not in a
runnable state! Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent 3000bdc commit 90422c2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/aero_kernel/src/userland/scheduler/round_robin.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,16 @@ impl RoundRobin {
181181
queue.preempt_task.arch_task_mut(),
182182
current.arch_task(),
183183
);
184+
return;
184185
}
185-
} else {
186-
queue.current_task = None;
187-
core::mem::drop(guard);
188-
arch::task::arch_task_spinup(
189-
queue.preempt_task.arch_task_mut(),
190-
queue.idle_task.arch_task(),
191-
);
192186
}
187+
188+
queue.current_task = None;
189+
core::mem::drop(guard);
190+
arch::task::arch_task_spinup(
191+
queue.preempt_task.arch_task_mut(),
192+
queue.idle_task.arch_task(),
193+
);
193194
}
194195
}
195196
}

0 commit comments

Comments
 (0)