Atomic Operations#

Atomic operations provide RAM store and read functionalities.

Atomic Operations Usage#

Macros#

#define
sl_atomic_load (dest, source)

Perform an atomic load.

#define
sl_atomic_store (dest, source)

Perform an atomic store.

Macro Definition Documentation#

sl_atomic_load#

#define sl_atomic_load
Value:
(dest, source)

Perform an atomic load.

Use when a variable must be read from RAM.

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.


Definition at line 57 of file platform/common/inc/sl_atomic.h

sl_atomic_store#

#define sl_atomic_store
Value:
(dest, source)

Perform an atomic store.

Use when a value must be stored in RAM.

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.


Definition at line 76 of file platform/common/inc/sl_atomic.h