4 ms·
The first point is quite valid though. From "https://doc.rust-lang.org/reference/memory-model.html https://doc.rust-lang.org/reference/memory-model.html" where
by lenkite 6y ago
The first point is quite valid though. From "https://doc.rust-lang.org/reference/memory-model.html https://doc.rust-lang.org/reference/memory-model.html" where it says "Rust does not yet have a defined memory model"
- myrrlyn 6y agothe unstated part here is that in the absence of a compiler-visible atomic modelling system, an atomic model is implemented in `core::atomic` and LLVM. similarly, a `kcore` library could provide atomic types just like the way the LKMM is defined as a library in-tree. this is not a language limitation, as the language is able to emit LLVM atomic operations just fine. like allocations, it needs people with a defined goal (like the kernel) to provide a target for implementations to reach; proäctive creation of a model without knowing if it has an audience is not worthwhile, which is why it hasn't been done