Atomic Reference
Functions
-
void
ctrAtomicAdd(uint32_t *ea, const uint32_t value) Atomically add a value to a variable.
- Parameters
ea-Address of the value to atomically update.
value-Value to add to the variable.
-
void
ctrAtomicSub(uint32_t *ea, const uint32_t value) Atomically subtract a value from a variable.
- Parameters
ea-Address of the value to atomically update.
value-Value to subtract from the variable.
-
void
ctrAtomicAnd(uint32_t *ea, const uint32_t value) Atomically perform an AND operation on a variable.
- Parameters
ea-Address of the value to atomically update.
value-Value to AND with the variable.
-
void
ctrAtomicOr(uint32_t *ea, const uint32_t value) Atomically perform an OR operation on a variable.
- Parameters
ea-Address of the value to atomically update.
value-Value to OR with the variable.
-
void
ctrAtomicStore(uint32_t *ea, const uint32_t value) Atomically set the value of a variable.
- Parameters
ea-Address of the value to atomically update.
value-Value to OR with the variable.
-
void
ctrAtomicIncrement(uint32_t *ea) Atomically increment a variable.
- Parameters
ea-Address of the value to atomically update.
-
void
ctrAtomicDecrement(uint32_t *ea) Atomically decrement a variable.
- Parameters
ea-Address of the value to atomically update.
-
void
ctrAtomicCompareAndSwap(uint32_t *ea, uint32_t compare, uint32_t value) Atomically replace the value of a variable, if it matches a certain value.
- Parameters
ea-Address of the value to atomically update.
compare-Value to compare against.
value-Replacement value, if the variable is a match.
-
uint32_t
ctrAtomicRead(uint32_t *ea) Atomically read an integer value.
- Return
- Current value of the atomic variable.
- Parameters
ea-Address of the variable to atomically read.