Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(interrupts): replace compiler fences with potentially-synchronizi…
…ng 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 <martin.kroening@eonerc.rwth-aachen.de> * 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 <martin.kroening@eonerc.rwth-aachen.de> --------- Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
- Loading branch information