The atomic_load
function atomically returns the value that the obj
is pointing to. It is defined for all atomic types and does not throw exceptions. The volatile
keyword informs the compiler that the value of this variable may change anytime.
A
- one of the atomic types.
C
- A
's corresponding non-atomic type.
obj
- the pointer to the atomic object that has to be read.
order
- the order of memory synchronization for this operation. This will be executed by one of the following values. These are of the enum
type memory_order:
memory_order_seq_cst
memory_order_consume
memory_order_acquire
memory_order_relaxed
The value of atomic variable
that the object
is currently pointing at.
Free Resources