← core

core/atomic.kur

//! Memory orderings for the atomic operations on raw pointers
//! (`unsafe p.atomic_load(Ordering::Acquire)`, `unsafe fence(...)`, ...),
//! with the meanings C11 gives them. An ordering argument must be one of
//! these variants written out literally: the compiler picks the operation
//! from it, so it is never a runtime value.

/// A memory ordering for an atomic operation or fence, as C11's
/// `memory_order` names it.
exposed enum Ordering {
    Relaxed,
    Acquire,
    Release,
    AcqRel,
    SeqCst,
}

// `unsafe fence(ordering)`: a memory fence, C11's `atomic_thread_fence`.
export builtin::fence;