You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(interrupts): replace compiler fences with potentially-synchronizing assembly (#440)
* fix(interrupts): replace compiler fences with potentially-synchronizing assembly
Compiler fences only synchronize with atomic instructions. When creating a thread-local critical section, we need to prevent reordering of any reads and writes across interrupt toggles, not just atomic ones. To achieve this, we omit `nomem` from `asm!`. Since then, the assembly might potentially perform synchronizing operations such as acquiring or releasing a lock, the compiler won't move any reads and writes through these assembly blocks.
Signed-off-by: Martin Kröning <[email protected]>
* fix(interrupts): add `preserves_flags` option
`IF` from `EFLAGS` must not be restored upon exiting the asm block.
https://doc.rust-lang.org/stable/reference/inline-assembly.html#rules-for-inline-assembly
Signed-off-by: Martin Kröning <[email protected]>
---------
Signed-off-by: Martin Kröning <[email protected]>
0 commit comments