about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-11-28 03:16:43 +0800
committerGitHub <noreply@github.com>2017-11-28 03:16:43 +0800
commitaa99bd96fdbbe00e5aa96927c5edba908095527f (patch)
treeeda1cd008de6a39a1b4bfcce2bfdcae287673ea0 /src/libcore
parent2f012e4405c6d5bdd2855f3e1c416bd6e75808d8 (diff)
parentd5e8b61054018799c09d0e4c7166a6c4f198cbc5 (diff)
Rollup merge of #46174 - stjepang:stabilize-spinloophint, r=sfackler
Stabilize spin_loop_hint

Stabilize `spin_loop_hint` in release `1.23.0`.
I've also renamed feature `hint_core_should_pause` to `spin_loop_hint`.

cc #41196
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/sync/atomic.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
index b7cf6d778a2..8a261b8f077 100644
--- a/src/libcore/sync/atomic.rs
+++ b/src/libcore/sync/atomic.rs
@@ -103,9 +103,8 @@ use fmt;
 ///
 /// On some platforms this function may not do anything at all.
 #[inline]
-#[unstable(feature = "hint_core_should_pause", issue = "41196")]
-pub fn hint_core_should_pause()
-{
+#[stable(feature = "spin_loop_hint", since = "1.24.0")]
+pub fn spin_loop_hint() {
     #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
     unsafe {
         asm!("pause" ::: "memory" : "volatile");