mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
itimer: allow interrupts to happen while waiting to schedule on a specific cpu
This commit is contained in:
@@ -34,6 +34,10 @@ void itimer_pause(itimer_t *itimer, uintmax_t *remainingus, uintmax_t *repeatus)
|
|||||||
// schedule on the itimer cpu
|
// schedule on the itimer cpu
|
||||||
sched_targetcpu(itimer->cpu);
|
sched_targetcpu(itimer->cpu);
|
||||||
spinlock_release(&itimer->lock);
|
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_yield();
|
||||||
sched_targetcpu(NULL);
|
sched_targetcpu(NULL);
|
||||||
spinlock_acquire(&itimer->lock);
|
spinlock_acquire(&itimer->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user