Function std::intrinsics::atomic_singlethreadfence_acq [−][src]
pub unsafe extern "rust-intrinsic" fn atomic_singlethreadfence_acq()
🔬 This is a nightly-only experimental API. (core_intrinsics
)
intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
Expand description
仅编译器的内存屏障。
编译器绝不会在此障碍上对内存访问进行重新排序,但不会为此发出任何指令。 这适用于可能被抢占的同一线程上的操作,例如与信号处理程序进行交互时。
通过将 Ordering::Acquire
传递为 order
,可以在 atomic::compiler_fence
中获得此内联函数的稳定版本。