mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
33 lines
933 B
Diff
33 lines
933 B
Diff
From 6a5c292f9f9e28de4319f52b05744ed7d8863f76 Mon Sep 17 00:00:00 2001
|
|
From: bjorn3 <bjorn3@users.noreply.github.com>
|
|
Date: Sat, 6 Oct 2018 10:22:16 +0200
|
|
Subject: [PATCH] Disable inline assembly in spin_loop_hint
|
|
|
|
---
|
|
src/libcore/sync/atomic.rs | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
|
|
index f130dbf..31db7a2 100644
|
|
--- a/src/libcore/sync/atomic.rs
|
|
+++ b/src/libcore/sync/atomic.rs
|
|
@@ -106,6 +106,7 @@ use fmt;
|
|
#[inline]
|
|
#[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");
|
|
@@ -115,6 +116,7 @@ pub fn spin_loop_hint() {
|
|
unsafe {
|
|
asm!("yield" ::: "memory" : "volatile");
|
|
}
|
|
+ */
|
|
}
|
|
|
|
/// A boolean type which can be safely shared between threads.
|
|
--
|
|
2.17.1 (Apple Git-112)
|
|
|