scheduler: make idle cpus steal work

This commit is contained in:
Matheus
2026-09-16 00:00:56 -03:00
parent 10cd22207d
commit 7a533242ad
4 changed files with 58 additions and 3 deletions
+6 -2
View File
@@ -274,8 +274,12 @@ void sched_preempt_cpu(cpu_t *cpu) {
static void idle_thread(void) {
interrupt_set(true);
while (1)
CPU_HALT();
while (1) {
if (sched_idle_steal_work())
sched_yield();
else
CPU_HALT();
}
}
void sched_target_cpu(cpu_t *cpu) {