scheduler: add yield after halt in cpuidlethread

This commit is contained in:
Matheus
2023-07-20 14:24:52 -03:00
parent b0f12deff8
commit ac8cdfb2f3
+3 -2
View File
@@ -369,10 +369,11 @@ static void timerhook(context_t *context, dpcarg_t arg) {
}
static void cpuidlethread() {
// TODO check every interrupt rather than waiting for a scheduler timer interrupt
interrupt_set(true);
while (1)
while (1) {
CPU_HALT();
sched_yield();
}
}
void sched_targetcpu(cpu_t *cpu) {