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.

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.