itimer: allow interrupts to happen while waiting to schedule on a specific cpu

This commit is contained in:
Matheus
2024-08-22 20:17:32 -03:00
parent 5bc363d1ee
commit ecd4a72677
+4
View File
@@ -34,6 +34,10 @@ void itimer_pause(itimer_t *itimer, uintmax_t *remainingus, uintmax_t *repeatus)
// schedule on the itimer cpu
sched_targetcpu(itimer->cpu);
spinlock_release(&itimer->lock);
// allow interrupts to be handled (such as a tlb shootdown)
// as the other cpu could be busy waiting for this one
interrupt_set(true);
interrupt_set(false);
sched_yield();
sched_targetcpu(NULL);
spinlock_acquire(&itimer->lock);