Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-base

Source of release 0.43.0

0.43.0 / src / std / atomic.lucb

#==============================================================================================
#
#   atomic - Memory orderings and fences for `@T` operations
#
#   DESCRIPTION:
#       Memory orderings for the operations of `@T` (ยง15.1).
#
#==============================================================================================

## The memory ordering of an `@T` operation.
pub enum Ordering as u8:
    relaxed = 1
    acquire = 2
    release = 3
    acq_rel = 4
    seq_cst = 5
    ## A fence's alone: the compiler moves no memory access across it, and the processor is
    ## told nothing, what a signal handler sharing data with the code it interrupts needs.
    signal = 6

## A standalone fence; the backend supplies the instruction.
pub func fence(order: Ordering):
    _ = order