overly strict semantics
overly strict semantics
Posted Jan 10, 2026 15:42 UTC (Sat) by bjackman (subscriber, #109548)In reply to: overly strict semantics by bertschingert
Parent article: READ_ONCE(), WRITE_ONCE(), but not for Rust
I think one of the most common usecases for {READ,WRITE}_ONCE is where you have concurrency without parallelism. E.g. when sharing CPU-local data between a task and an IRQ.
IIUC C11's relaxed ordering is too weak for that, but any of the other C11 orderings are likely to be unnecessarily strict, i.e. they might force the use of special (costly) CPU instructions where normal reads and writes are already safe enough.
