@@ -341,6 +341,9 @@ extern "rust-intrinsic" {
341
341
/// [`Ordering::Relaxed`] as the `order`. For example, [`AtomicBool::load`].
342
342
#[ rustc_nounwind]
343
343
pub fn atomic_load_relaxed < T : Copy > ( src : * const T ) -> T ;
344
+ /// Do NOT use this intrinsic; "unordered" operations do not exist in our memory model!
345
+ /// In terms of the Rust Abstract Machine, this operation is equivalent to `src.read()`,
346
+ /// i.e., it performs a non-atomic read.
344
347
#[ rustc_nounwind]
345
348
pub fn atomic_load_unordered < T : Copy > ( src : * const T ) -> T ;
346
349
@@ -365,6 +368,9 @@ extern "rust-intrinsic" {
365
368
/// [`Ordering::Relaxed`] as the `order`. For example, [`AtomicBool::store`].
366
369
#[ rustc_nounwind]
367
370
pub fn atomic_store_relaxed < T : Copy > ( dst : * mut T , val : T ) ;
371
+ /// Do NOT use this intrinsic; "unordered" operations do not exist in our memory model!
372
+ /// In terms of the Rust Abstract Machine, this operation is equivalent to `dst.write(val)`,
373
+ /// i.e., it performs a non-atomic write.
368
374
#[ rustc_nounwind]
369
375
pub fn atomic_store_unordered < T : Copy > ( dst : * mut T , val : T ) ;
370
376
@@ -2312,6 +2318,10 @@ extern "rust-intrinsic" {
2312
2318
2313
2319
/// Emits a `!nontemporal` store according to LLVM (see their docs).
2314
2320
/// Probably will never become stable.
2321
+ ///
2322
+ /// Do NOT use this intrinsic; "nontemporal" operations do not exist in our memory model!
2323
+ /// It exists to support current stdarch, but the plan is to change stdarch and remove this intrinsic.
2324
+ /// See <https://github.com/rust-lang/rust/issues/114582> for some more discussion.
2315
2325
#[ rustc_nounwind]
2316
2326
pub fn nontemporal_store < T > ( ptr : * mut T , val : T ) ;
2317
2327
0 commit comments