@atomicLoad

@atomicLoad

@atomicLoad(comptime T: type, ptr: *const T, comptime ordering: builtin.AtomicOrder) T

This builtin function atomically dereferences a pointer and returns the value.

T must be a pointer, a bool, a float, an integer or an enum.

See also:

  • @atomicStore
  • @atomicRmw
  • @fence
  • @cmpxchgWeak
  • @cmpxchgStrong