Skip to content

Commit

Permalink
Document stabilized versions of atomic singlethreaded fences
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSeulArtichaut committed Feb 11, 2020
1 parent d53ee47 commit b22d370
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,27 +851,51 @@ extern "rust-intrinsic" {
/// compiler, but no instructions will be emitted for it. This is
/// appropriate for operations on the same thread that may be preempted,
/// such as when interacting with signal handlers.
///
/// The stabilized version of this intrinsic is available in
/// [`std::sync::atomic::compiler_fence`](../../std/sync/atomic/fn.compiler_fence.html)
/// by passing
/// [`Ordering::SeqCst`](../../std/sync/atomic/enum.Ordering.html#variant.SeqCst)
/// as the `order`.
pub fn atomic_singlethreadfence();
/// A compiler-only memory barrier.
///
/// Memory accesses will never be reordered across this barrier by the
/// compiler, but no instructions will be emitted for it. This is
/// appropriate for operations on the same thread that may be preempted,
/// such as when interacting with signal handlers.
///
/// The stabilized version of this intrinsic is available in
/// [`std::sync::atomic::compiler_fence`](../../std/sync/atomic/fn.compiler_fence.html)
/// by passing
/// [`Ordering::Acquire`](../../std/sync/atomic/enum.Ordering.html#variant.Acquire)
/// as the `order`.
pub fn atomic_singlethreadfence_acq();
/// A compiler-only memory barrier.
///
/// Memory accesses will never be reordered across this barrier by the
/// compiler, but no instructions will be emitted for it. This is
/// appropriate for operations on the same thread that may be preempted,
/// such as when interacting with signal handlers.
///
/// The stabilized version of this intrinsic is available in
/// [`std::sync::atomic::compiler_fence`](../../std/sync/atomic/fn.compiler_fence.html)
/// by passing
/// [`Ordering::Release`](../../std/sync/atomic/enum.Ordering.html#variant.Release)
/// as the `order`.
pub fn atomic_singlethreadfence_rel();
/// A compiler-only memory barrier.
///
/// Memory accesses will never be reordered across this barrier by the
/// compiler, but no instructions will be emitted for it. This is
/// appropriate for operations on the same thread that may be preempted,
/// such as when interacting with signal handlers.
///
/// The stabilized version of this intrinsic is available in
/// [`std::sync::atomic::compiler_fence`](../../std/sync/atomic/fn.compiler_fence.html)
/// by passing
/// [`Ordering::AcqRel`](../../std/sync/atomic/enum.Ordering.html#variant.AcqRel)
/// as the `order`.
pub fn atomic_singlethreadfence_acqrel();

/// Magic intrinsic that derives its meaning from attributes
Expand Down

0 comments on commit b22d370

Please sign in to comment.