Panther Search Documentation Tutorials Devlogs Downloads Source Code

Documentation > Panther Documentation > Intrinsics > @atomicLoad

@atomicLoad

Panther
Documentation


1: func @atomicLoad = <{TARGET: Type, VALUE: Type, ORDER: @pthr.AtomicOrdering}> (target: TARGET) -> VALUE;

  Atomically load a value.

Template Parameters

  TARGET: must be a non-optional pointer, and is a pointer to the type of value to load

  VALUE: must be the result of a dereference of TARGET, trivially-copyable, and cannot be F80

  ORDER: cannot be @pthr.AtomicOrdering.RELEASE or @pthr.AtomicOrdering.ACQ_REL

Parameters

  target: target to load

Return Value

  The atomically loaded value.

Example

(TODO)

See Also

@atomicStore Atomically store a value
@atomicRMW Atomic read-modify-write
@cmpxchg Atomic compare-exchange