about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-05-28 15:06:08 +0200
committerRalf Jung <post@ralfj.de>2025-05-28 15:20:29 +0200
commit2593df8837f330301b5679e33efd54f36ba43c43 (patch)
treeaef5cd3d89baedc653b0334f2679dad55f1ff19a /library
parent77101febcc9662a076ff43887497cd5b30674d93 (diff)
downloadrust-2593df8837f330301b5679e33efd54f36ba43c43.tar.gz
rust-2593df8837f330301b5679e33efd54f36ba43c43.zip
core: unstably expose atomic_compare_exchange so stdarch can use it
Diffstat (limited to 'library')
-rw-r--r--library/core/src/sync/atomic.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
index bd5a58d74ba..6bc6bee682d 100644
--- a/library/core/src/sync/atomic.rs
+++ b/library/core/src/sync/atomic.rs
@@ -3885,10 +3885,13 @@ unsafe fn atomic_sub<T: Copy>(dst: *mut T, val: T, order: Ordering) -> T {
     }
 }
 
+/// Publicly exposed for stdarch; nobody else should use this.
 #[inline]
 #[cfg(target_has_atomic)]
 #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
-unsafe fn atomic_compare_exchange<T: Copy>(
+#[unstable(feature = "core_intrinsics", issue = "none")]
+#[doc(hidden)]
+pub unsafe fn atomic_compare_exchange<T: Copy>(
     dst: *mut T,
     old: T,
     new: T,