mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 14:08:21 +00:00
scheduler: add yield after halt in cpuidlethread
This commit is contained in:
@@ -369,10 +369,11 @@ static void timerhook(context_t *context, dpcarg_t arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void cpuidlethread() {
|
static void cpuidlethread() {
|
||||||
// TODO check every interrupt rather than waiting for a scheduler timer interrupt
|
|
||||||
interrupt_set(true);
|
interrupt_set(true);
|
||||||
while (1)
|
while (1) {
|
||||||
CPU_HALT();
|
CPU_HALT();
|
||||||
|
sched_yield();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sched_targetcpu(cpu_t *cpu) {
|
void sched_targetcpu(cpu_t *cpu) {
|
||||||
|
|||||||
Reference in New Issue
Block a user