read/write volatile
read/write volatile
Posted Jan 9, 2026 19:20 UTC (Fri) by josh (subscriber, #17465)In reply to: read/write volatile by mb
Parent article: READ_ONCE(), WRITE_ONCE(), but not for Rust
> Yes, I know there is AtomicXX and no it's not efficient for reasons
Relaxed atomics are effectively compiler-barrier atomics, and *shouldn't* have any runtime overhead. Are you encountering cases where there's more inefficiency than that?
