rust-osdev / rust-osdev/mem-barrier
Compiler barrier implementation and use
Open
@mkroening is already working on this.
Since Aug 31, 2026.
- Dominant language
- Rust
- Stars
- 6
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I see a compiler_barrier() is just empty asm, however shouldn't it be a core::sync::atomic::compiler_fence(Ordering::SeqCst) instead?
Also, all the memory barrier instructions should probably be guarded with compiler fences like here (see discussion in https://github.com/rust-embedded/cortex-m/pull/308 and fix in https://github.com/rust-embedded/cortex-m/pull/311).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.