3 ms·
> which do exactly what they say on the box I mean, the box says: https://doc.rust-lang.org/stable/std/ptr/fn.read_volatile.html#notes https://doc.rust-lang.o
by steveklabnik 5y ago
> which do exactly what they say on the box
I mean, the box says: https://doc.rust-lang.org/stable/std/ptr/fn.read_volatile.html#notes https://doc.rust-lang.org/stable/std/ptr/fn.read_volatile.ht...
> Rust does not currently have a rigorously and formally defined memory model, so the precise semantics of what “volatile” means here is subject to change over time. That being said, the semantics will almost always end up pretty similar to C11’s definition of volatile.
Which isn't exactly "exact", you know?
- tialaramex 5y agoIt's not. But I feel confident (perhaps my confidence is misplaced) that this is because what's really going on here is that this does what LLVM does, and there's some risk LLVM changes exactly what it does, most likely to suit clang so in that case Rust has to go along for the ride or perhaps get itself a new suite of compiler backends... If so I feel that risk is small and continues to shrink.
- steveklabnik 5y agoTotally. Hence my original question, some folks want an actual airtight guarantee, some are comfy with where things are now.