restore SIGNAL_WORK_THREAD_MODE
This commit is contained in:
parent
6e1120e17e
commit
e70ae71ecc
@ -54,8 +54,13 @@ impl Executor {
|
|||||||
loop {
|
loop {
|
||||||
unsafe {
|
unsafe {
|
||||||
self.inner.poll();
|
self.inner.poll();
|
||||||
|
// we do not care about race conditions between the load and store operations, interrupts
|
||||||
|
// will only set this value to true.
|
||||||
|
// if there is work to do, loop back to polling
|
||||||
|
if !SIGNAL_WORK_THREAD_MODE.fetch_and(false, Ordering::SeqCst) {
|
||||||
core::arch::asm!("wfi");
|
core::arch::asm!("wfi");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user