-
Notifications
You must be signed in to change notification settings - Fork 232
atomic_load_unordered and atomic_store_unordered should not be used #788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The |
Oh interesting, why are those |
I believe this has been resolved with #790. |
remove 'unordered' atomic intrinsics As their doc comment already indicates, these operations do not currently have a place in our memory model. The intrinsics were introduced to support a hack in compiler-builtins, but that hack recently got removed (see rust-lang/compiler-builtins#788).
remove 'unordered' atomic intrinsics As their doc comment already indicates, these operations do not currently have a place in our memory model. The intrinsics were introduced to support a hack in compiler-builtins, but that hack recently got removed (see rust-lang/compiler-builtins#788).
remove 'unordered' atomic intrinsics As their doc comment already indicates, these operations do not currently have a place in our memory model. The intrinsics were introduced to support a hack in compiler-builtins, but that hack recently got removed (see rust-lang/compiler-builtins#788).
Rollup merge of rust-lang#140660 - RalfJung:more-order, r=WaffleLapkin remove 'unordered' atomic intrinsics As their doc comment already indicates, these operations do not currently have a place in our memory model. The intrinsics were introduced to support a hack in compiler-builtins, but that hack recently got removed (see rust-lang/compiler-builtins#788).
remove 'unordered' atomic intrinsics As their doc comment already indicates, these operations do not currently have a place in our memory model. The intrinsics were introduced to support a hack in compiler-builtins, but that hack recently got removed (see rust-lang/compiler-builtins#788).
The atomic_load_unordered and atomic_store_unordered intrinsics generate LLVM IR that cannot be mapped to the Rust AM (specifically, they cannot be represented in the C++ concurrency memory model), and as such there's no well-defined way to use them in a Rust program. Ideally we'd remove those intrinsics from the compiler. That is currently blocked on the issue that this crate uses those intrinsics.
Most of those uses seem to be to provide various intrinsics like
__llvm_memcpy_element_unordered_atomic_1
. Since Rust cannot use unordered atomics, those intrinsics should not be needed, right? Why do they even exist?The other uses are in
src/arm_linux.rs
andsrc/mem/impls.rs
. The latter code is already problematic for other reasons (#559). For both, I wonder if we could just use "relaxed" accesses instead, so that at least those are accesses that make sense in our memory model?The text was updated successfully, but these errors were encountered: