Atomic Operations
Description
Atomic operations.
Macros |
|
#define | sl_atomic_load (dest, source) ((dest) = (source)) |
Perform an atomic load.
|
|
#define | sl_atomic_store (dest, source) ((dest) = (source)) |
Perform an atomic store.
|
|
Macro Definition Documentation
◆ sl_atomic_load
#define sl_atomic_load | ( |
dest,
|
|
source
|
|||
) | ((dest) = (source)) |
Perform an atomic load.
Use when a variable must be read from RAM.
- Parameters
-
dest
Variable where to copy the loaded value. source
Variable from where to load the value.
- Note
- Does only support native types <= 32 bits.
- Load operation on 32 bit value is atomic on ARM architecture.
- Only the load operation from 'source' is guaranteed to be performed atomically. If writing to 'dest' implies a store, the load and store operations are not guaranteed to be performed atomically.
◆ sl_atomic_store
#define sl_atomic_store | ( |
dest,
|
|
source
|
|||
) | ((dest) = (source)) |
Perform an atomic store.
Use when a value must be stored in RAM.
- Parameters
-
dest
Variable where to store the value. source
Variable that contains the value to store in 'dest'.
- Note
- Does only support native types <= 32 bits.
- Store operation on 32 bit value is atomic on ARM architecture.
- Only the store operation to 'dest' is guaranteed to be performed atomically. If reading from 'source' implies a load, the store and load operations are not guaranteed to be performed atomically.