mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-30 00:00:15 +01:00
enable interrupts during busy waiting
This commit is contained in:
parent
fe330cf103
commit
8b170bb527
1 changed files with 2 additions and 0 deletions
|
@ -186,7 +186,9 @@ inline static int spinlock_irqsave_lock(spinlock_irqsave_t* s) {
|
||||||
|
|
||||||
ticket = atomic_int64_inc(&s->queue);
|
ticket = atomic_int64_inc(&s->queue);
|
||||||
while (atomic_int64_read(&s->dequeue) != ticket) {
|
while (atomic_int64_read(&s->dequeue) != ticket) {
|
||||||
|
irq_nested_enable(flags);
|
||||||
PAUSE;
|
PAUSE;
|
||||||
|
irq_nested_disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
s->coreid = CORE_ID;
|
s->coreid = CORE_ID;
|
||||||
|
|
Loading…
Add table
Reference in a new issue