Atomic functions function analogously to C11 and C++11 - loads have acquire semantics, stores have release semantics, and atomic operations are sequentially consistent. More...
Data Structures | |
struct | core_util_atomic_flag |
A lock-free, primitive atomic flag. More... | |
Macros | |
#define | CORE_UTIL_ATOMIC_FLAG_INIT { 0 } |
Initializer for a core_util_atomic_flag. More... | |
Typedefs | |
typedef enum mbed_memory_order | mbed_memory_order |
Memory order constraints for atomic operations. More... | |
typedef struct core_util_atomic_flag | core_util_atomic_flag |
A lock-free, primitive atomic flag. More... | |
Enumerations |
Functions | |
bool | core_util_atomic_flag_test_and_set (volatile core_util_atomic_flag *flagPtr) |
Atomic test and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_flag_test_and_set_explicit (volatile core_util_atomic_flag *valuePtr, mbed_memory_order order) |
\ copydoc core_util_atomic_flag_test_and_set More... | |
MBED_FORCEINLINE void | core_util_atomic_flag_clear (volatile core_util_atomic_flag *flagPtr) |
Atomic clear. More... | |
MBED_FORCEINLINE void | core_util_atomic_flag_clear_explicit (volatile core_util_atomic_flag *flagPtr, mbed_memory_order order) |
\ copydoc core_util_atomic_flag_clear More... | |
bool | core_util_atomic_cas_u8 (volatile uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_u8 (volatile uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
bool | core_util_atomic_cas_u16 (volatile uint16_t *ptr, uint16_t *expectedCurrentValue, uint16_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_u16 (volatile uint16_t *ptr, uint16_t *expectedCurrentValue, uint16_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
bool | core_util_atomic_cas_u32 (volatile uint32_t *ptr, uint32_t *expectedCurrentValue, uint32_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_u32 (volatile uint32_t *ptr, uint32_t *expectedCurrentValue, uint32_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
bool | core_util_atomic_cas_u64 (volatile uint64_t *ptr, uint64_t *expectedCurrentValue, uint64_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_u64 (volatile uint64_t *ptr, uint64_t *expectedCurrentValue, uint64_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_s8 (volatile int8_t *ptr, int8_t *expectedCurrentValue, int8_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_s8 (volatile int8_t *ptr, int8_t *expectedCurrentValue, int8_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_s16 (volatile int16_t *ptr, int16_t *expectedCurrentValue, int16_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_s16 (volatile int16_t *ptr, int16_t *expectedCurrentValue, int16_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_s32 (volatile int32_t *ptr, int32_t *expectedCurrentValue, int32_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_s32 (volatile int32_t *ptr, int32_t *expectedCurrentValue, int32_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_s64 (volatile int64_t *ptr, int64_t *expectedCurrentValue, int64_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_s64 (volatile int64_t *ptr, int64_t *expectedCurrentValue, int64_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_bool (volatile bool *ptr, bool *expectedCurrentValue, bool desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_bool (volatile bool *ptr, bool *expectedCurrentValue, bool desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
bool | core_util_atomic_cas_ptr (void *volatile *ptr, void **expectedCurrentValue, void *desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_cas_explicit_ptr (void *volatile *ptr, void **expectedCurrentValue, void *desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
bool | core_util_atomic_compare_exchange_weak_u8 (volatile uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_u8 (volatile uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
bool | core_util_atomic_compare_exchange_weak_u16 (volatile uint16_t *ptr, uint16_t *expectedCurrentValue, uint16_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_u16 (volatile uint16_t *ptr, uint16_t *expectedCurrentValue, uint16_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
bool | core_util_atomic_compare_exchange_weak_u32 (volatile uint32_t *ptr, uint32_t *expectedCurrentValue, uint32_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_u32 (volatile uint32_t *ptr, uint32_t *expectedCurrentValue, uint32_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
bool | core_util_atomic_compare_exchange_weak_u64 (volatile uint64_t *ptr, uint64_t *expectedCurrentValue, uint64_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_u64 (volatile uint64_t *ptr, uint64_t *expectedCurrentValue, uint64_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_s8 (volatile int8_t *ptr, int8_t *expectedCurrentValue, int8_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_s8 (volatile int8_t *ptr, int8_t *expectedCurrentValue, int8_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_s16 (volatile int16_t *ptr, int16_t *expectedCurrentValue, int16_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_s16 (volatile int16_t *ptr, int16_t *expectedCurrentValue, int16_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_s32 (volatile int32_t *ptr, int32_t *expectedCurrentValue, int32_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_s32 (volatile int32_t *ptr, int32_t *expectedCurrentValue, int32_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_s64 (volatile int64_t *ptr, int64_t *expectedCurrentValue, int64_t desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_s64 (volatile int64_t *ptr, int64_t *expectedCurrentValue, int64_t desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_bool (volatile bool *ptr, bool *expectedCurrentValue, bool desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_bool (volatile bool *ptr, bool *expectedCurrentValue, bool desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_ptr (void *volatile *ptr, void **expectedCurrentValue, void *desiredValue) |
Atomic compare and set. More... | |
MBED_FORCEINLINE bool | core_util_atomic_compare_exchange_weak_explicit_ptr (void *volatile *ptr, void **expectedCurrentValue, void *desiredValue, mbed_memory_order success, mbed_memory_order failure) |
Atomic compare and set. More... | |
MBED_FORCEINLINE uint8_t | core_util_atomic_load_u8 (const volatile uint8_t *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE uint8_t | core_util_atomic_load_explicit_u8 (const volatile uint8_t *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE uint16_t | core_util_atomic_load_u16 (const volatile uint16_t *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE uint16_t | core_util_atomic_load_explicit_u16 (const volatile uint16_t *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE uint32_t | core_util_atomic_load_u32 (const volatile uint32_t *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE uint32_t | core_util_atomic_load_explicit_u32 (const volatile uint32_t *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
uint64_t | core_util_atomic_load_u64 (const volatile uint64_t *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE uint64_t | core_util_atomic_load_explicit_u64 (const volatile uint64_t *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_load_s8 (const volatile int8_t *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_load_explicit_s8 (const volatile int8_t *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_load_s16 (const volatile int16_t *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_load_explicit_s16 (const volatile int16_t *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_load_s32 (const volatile int32_t *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_load_explicit_s32 (const volatile int32_t *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_load_s64 (const volatile int64_t *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_load_explicit_s64 (const volatile int64_t *valuePtr, MBED_UNUSED mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE bool | core_util_atomic_load_bool (const volatile bool *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE bool | core_util_atomic_load_explicit_bool (const volatile bool *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE void * | core_util_atomic_load_ptr (void *const volatile *valuePtr) |
Atomic load. More... | |
MBED_FORCEINLINE void * | core_util_atomic_load_explicit_ptr (void *const volatile *valuePtr, mbed_memory_order order) |
Atomic load. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_u8 (volatile uint8_t *valuePtr, uint8_t desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_u8 (volatile uint8_t *valuePtr, uint8_t desiredValue, mbed_memory_order order) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_u16 (volatile uint16_t *valuePtr, uint16_t desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_u16 (volatile uint16_t *valuePtr, uint16_t desiredValue, mbed_memory_order order) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_u32 (volatile uint32_t *valuePtr, uint32_t desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_u32 (volatile uint32_t *valuePtr, uint32_t desiredValue, mbed_memory_order order) |
Atomic store. More... | |
void | core_util_atomic_store_u64 (volatile uint64_t *valuePtr, uint64_t desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_u64 (volatile uint64_t *valuePtr, uint64_t desiredValue, mbed_memory_order order) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_s8 (volatile int8_t *valuePtr, int8_t desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_s8 (volatile int8_t *valuePtr, int8_t desiredValue, mbed_memory_order order) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_s16 (volatile int16_t *valuePtr, int16_t desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_s16 (volatile int16_t *valuePtr, int16_t desiredValue, mbed_memory_order order) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_s32 (volatile int32_t *valuePtr, int32_t desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_s32 (volatile int32_t *valuePtr, int32_t desiredValue, mbed_memory_order order) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_s64 (volatile int64_t *valuePtr, int64_t desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_s64 (volatile int64_t *valuePtr, int64_t desiredValue, mbed_memory_order order) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_bool (volatile bool *valuePtr, bool desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_bool (volatile bool *valuePtr, bool desiredValue, mbed_memory_order order) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_ptr (void *volatile *valuePtr, void *desiredValue) |
Atomic store. More... | |
MBED_FORCEINLINE void | core_util_atomic_store_explicit_ptr (void *volatile *valuePtr, void *desiredValue, mbed_memory_order order) |
Atomic store. More... | |
uint8_t | core_util_atomic_exchange_u8 (volatile uint8_t *valuePtr, uint8_t desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE uint8_t | core_util_atomic_exchange_explicit_u8 (volatile uint8_t *valuePtr, uint8_t desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
uint16_t | core_util_atomic_exchange_u16 (volatile uint16_t *valuePtr, uint16_t desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE uint16_t | core_util_atomic_exchange_explicit_u16 (volatile uint16_t *valuePtr, uint16_t desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
uint32_t | core_util_atomic_exchange_u32 (volatile uint32_t *valuePtr, uint32_t desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE uint32_t | core_util_atomic_exchange_explicit_u32 (volatile uint32_t *valuePtr, uint32_t desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
uint64_t | core_util_atomic_exchange_u64 (volatile uint64_t *valuePtr, uint64_t desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE uint64_t | core_util_atomic_exchange_explicit_u64 (volatile uint64_t *valuePtr, uint64_t desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_exchange_s8 (volatile int8_t *valuePtr, int8_t desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_exchange_explicit_s8 (volatile int8_t *valuePtr, int8_t desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_exchange_s16 (volatile int16_t *valuePtr, int16_t desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_exchange_explicit_s16 (volatile int16_t *valuePtr, int16_t desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_exchange_s32 (volatile int32_t *valuePtr, int32_t desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_exchange_explicit_s32 (volatile int32_t *valuePtr, int32_t desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_exchange_s64 (volatile int64_t *valuePtr, int64_t desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_exchange_explicit_s64 (volatile int64_t *valuePtr, int64_t desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
MBED_FORCEINLINE bool | core_util_atomic_exchange_bool (volatile bool *valuePtr, bool desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE bool | core_util_atomic_exchange_explicit_bool (volatile bool *valuePtr, bool desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
void * | core_util_atomic_exchange_ptr (void *volatile *valuePtr, void *desiredValue) |
Atomic exchange. More... | |
MBED_FORCEINLINE void * | core_util_atomic_exchange_explicit_ptr (void *volatile *valuePtr, void *desiredValue, mbed_memory_order order) |
Atomic exchange. More... | |
uint8_t | core_util_atomic_incr_u8 (volatile uint8_t *valuePtr, uint8_t delta) |
Atomic increment. More... | |
uint16_t | core_util_atomic_incr_u16 (volatile uint16_t *valuePtr, uint16_t delta) |
Atomic increment. More... | |
uint32_t | core_util_atomic_incr_u32 (volatile uint32_t *valuePtr, uint32_t delta) |
Atomic increment. More... | |
uint64_t | core_util_atomic_incr_u64 (volatile uint64_t *valuePtr, uint64_t delta) |
Atomic increment. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_incr_s8 (volatile int8_t *valuePtr, int8_t delta) |
Atomic increment. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_incr_s16 (volatile int16_t *valuePtr, int16_t delta) |
Atomic increment. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_incr_s32 (volatile int32_t *valuePtr, int32_t delta) |
Atomic increment. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_incr_s64 (volatile int64_t *valuePtr, int64_t delta) |
Atomic increment. More... | |
void * | core_util_atomic_incr_ptr (void *volatile *valuePtr, ptrdiff_t delta) |
Atomic increment. More... | |
uint8_t | core_util_atomic_decr_u8 (volatile uint8_t *valuePtr, uint8_t delta) |
Atomic decrement. More... | |
uint16_t | core_util_atomic_decr_u16 (volatile uint16_t *valuePtr, uint16_t delta) |
Atomic decrement. More... | |
uint32_t | core_util_atomic_decr_u32 (volatile uint32_t *valuePtr, uint32_t delta) |
Atomic decrement. More... | |
uint64_t | core_util_atomic_decr_u64 (volatile uint64_t *valuePtr, uint64_t delta) |
Atomic decrement. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_decr_s8 (volatile int8_t *valuePtr, int8_t delta) |
Atomic decrement. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_decr_s16 (volatile int16_t *valuePtr, int16_t delta) |
Atomic decrement. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_decr_s32 (volatile int32_t *valuePtr, int32_t delta) |
Atomic decrement. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_decr_s64 (volatile int64_t *valuePtr, int64_t delta) |
Atomic decrement. More... | |
void * | core_util_atomic_decr_ptr (void *volatile *valuePtr, ptrdiff_t delta) |
Atomic decrement. More... | |
uint8_t | core_util_atomic_fetch_add_u8 (volatile uint8_t *valuePtr, uint8_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE uint8_t | core_util_atomic_fetch_add_explicit_u8 (volatile uint8_t *valuePtr, uint8_t arg, mbed_memory_order order) |
Atomic add. More... | |
uint16_t | core_util_atomic_fetch_add_u16 (volatile uint16_t *valuePtr, uint16_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE uint16_t | core_util_atomic_fetch_add_explicit_u16 (volatile uint16_t *valuePtr, uint16_t arg, mbed_memory_order order) |
Atomic add. More... | |
uint32_t | core_util_atomic_fetch_add_u32 (volatile uint32_t *valuePtr, uint32_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE uint32_t | core_util_atomic_fetch_add_explicit_u32 (volatile uint32_t *valuePtr, uint32_t arg, mbed_memory_order order) |
Atomic add. More... | |
uint64_t | core_util_atomic_fetch_add_u64 (volatile uint64_t *valuePtr, uint64_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE uint64_t | core_util_atomic_fetch_add_explicit_u64 (volatile uint64_t *valuePtr, uint64_t arg, mbed_memory_order order) |
Atomic add. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_fetch_add_s8 (volatile int8_t *valuePtr, int8_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_fetch_add_explicit_s8 (volatile int8_t *valuePtr, int8_t arg, mbed_memory_order order) |
Atomic add. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_fetch_add_s16 (volatile int16_t *valuePtr, int16_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_fetch_add_explicit_s16 (volatile int16_t *valuePtr, int16_t arg, mbed_memory_order order) |
Atomic add. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_fetch_add_s32 (volatile int32_t *valuePtr, int32_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_fetch_add_explicit_s32 (volatile int32_t *valuePtr, int32_t arg, mbed_memory_order order) |
Atomic add. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_fetch_add_s64 (volatile int64_t *valuePtr, int64_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_fetch_add_explicit_s64 (volatile int64_t *valuePtr, int64_t arg, mbed_memory_order order) |
Atomic add. More... | |
MBED_FORCEINLINE void * | core_util_atomic_fetch_add_ptr (void *volatile *valuePtr, ptrdiff_t arg) |
Atomic add. More... | |
MBED_FORCEINLINE void * | core_util_atomic_fetch_add_explicit_ptr (void *volatile *valuePtr, ptrdiff_t arg, mbed_memory_order order) |
Atomic add. More... | |
uint8_t | core_util_atomic_fetch_sub_u8 (volatile uint8_t *valuePtr, uint8_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE uint8_t | core_util_atomic_fetch_sub_explicit_u8 (volatile uint8_t *valuePtr, uint8_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
uint16_t | core_util_atomic_fetch_sub_u16 (volatile uint16_t *valuePtr, uint16_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE uint16_t | core_util_atomic_fetch_sub_explicit_u16 (volatile uint16_t *valuePtr, uint16_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
uint32_t | core_util_atomic_fetch_sub_u32 (volatile uint32_t *valuePtr, uint32_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE uint32_t | core_util_atomic_fetch_sub_explicit_u32 (volatile uint32_t *valuePtr, uint32_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
uint64_t | core_util_atomic_fetch_sub_u64 (volatile uint64_t *valuePtr, uint64_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE uint64_t | core_util_atomic_fetch_sub_explicit_u64 (volatile uint64_t *valuePtr, uint64_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_fetch_sub_s8 (volatile int8_t *valuePtr, int8_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE int8_t | core_util_atomic_fetch_sub_explicit_s8 (volatile int8_t *valuePtr, int8_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_fetch_sub_s16 (volatile int16_t *valuePtr, int16_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE int16_t | core_util_atomic_fetch_sub_explicit_s16 (volatile int16_t *valuePtr, int16_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_fetch_sub_s32 (volatile int32_t *valuePtr, int32_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE int32_t | core_util_atomic_fetch_sub_explicit_s32 (volatile int32_t *valuePtr, int32_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_fetch_sub_s64 (volatile int64_t *valuePtr, int64_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE int64_t | core_util_atomic_fetch_sub_explicit_s64 (volatile int64_t *valuePtr, int64_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
MBED_FORCEINLINE void * | core_util_atomic_fetch_sub_ptr (void *volatile *valuePtr, ptrdiff_t arg) |
Atomic subtract. More... | |
MBED_FORCEINLINE void * | core_util_atomic_fetch_sub_explicit_ptr (void *volatile *valuePtr, ptrdiff_t arg, mbed_memory_order order) |
Atomic subtract. More... | |
uint8_t | core_util_atomic_fetch_and_u8 (volatile uint8_t *valuePtr, uint8_t arg) |
Atomic bitwise and. More... | |
MBED_FORCEINLINE uint8_t | core_util_atomic_fetch_and_explicit_u8 (volatile uint8_t *valuePtr, uint8_t arg, mbed_memory_order order) |
Atomic bitwise and. More... | |
uint16_t | core_util_atomic_fetch_and_u16 (volatile uint16_t *valuePtr, uint16_t arg) |
Atomic bitwise and. More... | |
MBED_FORCEINLINE uint16_t | core_util_atomic_fetch_and_explicit_u16 (volatile uint16_t *valuePtr, uint16_t arg, mbed_memory_order order) |
Atomic bitwise and. More... | |
uint32_t | core_util_atomic_fetch_and_u32 (volatile uint32_t *valuePtr, uint32_t arg) |
Atomic bitwise and. More... | |
MBED_FORCEINLINE uint32_t | core_util_atomic_fetch_and_explicit_u32 (volatile uint32_t *valuePtr, uint32_t arg, mbed_memory_order order) |
Atomic bitwise and. More... | |
uint64_t | core_util_atomic_fetch_and_u64 (volatile uint64_t *valuePtr, uint64_t arg) |
Atomic bitwise and. More... | |
MBED_FORCEINLINE uint64_t | core_util_atomic_fetch_and_explicit_u64 (volatile uint64_t *valuePtr, uint64_t arg, mbed_memory_order order) |
Atomic bitwise and. More... | |
uint8_t | core_util_atomic_fetch_or_u8 (volatile uint8_t *valuePtr, uint8_t arg) |
Atomic bitwise inclusive or. More... | |
MBED_FORCEINLINE uint8_t | core_util_atomic_fetch_or_explicit_u8 (volatile uint8_t *valuePtr, uint8_t arg, mbed_memory_order order) |
Atomic bitwise inclusive or. More... | |
uint16_t | core_util_atomic_fetch_or_u16 (volatile uint16_t *valuePtr, uint16_t arg) |
Atomic bitwise inclusive or. More... | |
MBED_FORCEINLINE uint16_t | core_util_atomic_fetch_or_explicit_u16 (volatile uint16_t *valuePtr, uint16_t arg, mbed_memory_order order) |
Atomic bitwise inclusive or. More... | |
uint32_t | core_util_atomic_fetch_or_u32 (volatile uint32_t *valuePtr, uint32_t arg) |
Atomic bitwise inclusive or. More... | |
MBED_FORCEINLINE uint32_t | core_util_atomic_fetch_or_explicit_u32 (volatile uint32_t *valuePtr, uint32_t arg, mbed_memory_order order) |
Atomic bitwise inclusive or. More... | |
uint64_t | core_util_atomic_fetch_or_u64 (volatile uint64_t *valuePtr, uint64_t arg) |
Atomic bitwise inclusive or. More... | |
MBED_FORCEINLINE uint64_t | core_util_atomic_fetch_or_explicit_u64 (volatile uint64_t *valuePtr, uint64_t arg, mbed_memory_order order) |
Atomic bitwise inclusive or. More... | |
uint8_t | core_util_atomic_fetch_xor_u8 (volatile uint8_t *valuePtr, uint8_t arg) |
Atomic bitwise exclusive or. More... | |
MBED_FORCEINLINE uint8_t | core_util_atomic_fetch_xor_explicit_u8 (volatile uint8_t *valuePtr, uint8_t arg, mbed_memory_order order) |
Atomic bitwise exclusive or. More... | |
uint16_t | core_util_atomic_fetch_xor_u16 (volatile uint16_t *valuePtr, uint16_t arg) |
Atomic bitwise exclusive or. More... | |
MBED_FORCEINLINE uint16_t | core_util_atomic_fetch_xor_explicit_u16 (volatile uint16_t *valuePtr, uint16_t arg, mbed_memory_order order) |
Atomic bitwise exclusive or. More... | |
uint32_t | core_util_atomic_fetch_xor_u32 (volatile uint32_t *valuePtr, uint32_t arg) |
Atomic bitwise exclusive or. More... | |
MBED_FORCEINLINE uint32_t | core_util_atomic_fetch_xor_explicit_u32 (volatile uint32_t *valuePtr, uint32_t arg, mbed_memory_order order) |
Atomic bitwise exclusive or. More... | |
uint64_t | core_util_atomic_fetch_xor_u64 (volatile uint64_t *valuePtr, uint64_t arg) |
Atomic bitwise exclusive or. More... | |
MBED_FORCEINLINE uint64_t | core_util_atomic_fetch_xor_explicit_u64 (volatile uint64_t *valuePtr, uint64_t arg, mbed_memory_order order) |
Atomic bitwise exclusive or. More... | |
Atomic functions function analogously to C11 and C++11 - loads have acquire semantics, stores have release semantics, and atomic operations are sequentially consistent.
Atomicity is enforced both between threads and interrupt handlers.
#define CORE_UTIL_ATOMIC_FLAG_INIT { 0 } |
typedef struct core_util_atomic_flag core_util_atomic_flag |
A lock-free, primitive atomic flag.
Emulate C11's atomic_flag. The flag is initially in an indeterminate state unless explicitly initialized with CORE_UTIL_ATOMIC_FLAG_INIT.
typedef enum mbed_memory_order mbed_memory_order |
Memory order constraints for atomic operations.
Intended semantics are as per C++11.
enum mbed_memory_order |
Memory order constraints for atomic operations.
Intended semantics are as per C++11.
Definition at line 51 of file mbed_atomic.h.
MBED_FORCEINLINE bool core_util_atomic_cas_bool | ( | volatile bool * | ptr, |
bool * | expectedCurrentValue, | ||
bool | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
Definition at line 768 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_bool | ( | volatile bool * | ptr, |
bool * | expectedCurrentValue, | ||
bool | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 773 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_ptr | ( | void *volatile * | ptr, |
void ** | expectedCurrentValue, | ||
void * | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 793 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_s16 | ( | volatile int16_t * | ptr, |
int16_t * | expectedCurrentValue, | ||
int16_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 765 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_s32 | ( | volatile int32_t * | ptr, |
int32_t * | expectedCurrentValue, | ||
int32_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 765 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_s64 | ( | volatile int64_t * | ptr, |
int64_t * | expectedCurrentValue, | ||
int64_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 765 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_s8 | ( | volatile int8_t * | ptr, |
int8_t * | expectedCurrentValue, | ||
int8_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 765 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_u16 | ( | volatile uint16_t * | ptr, |
uint16_t * | expectedCurrentValue, | ||
uint16_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_u32 | ( | volatile uint32_t * | ptr, |
uint32_t * | expectedCurrentValue, | ||
uint32_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_u64 | ( | volatile uint64_t * | ptr, |
uint64_t * | expectedCurrentValue, | ||
uint64_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
MBED_FORCEINLINE bool core_util_atomic_cas_explicit_u8 | ( | volatile uint8_t * | ptr, |
uint8_t * | expectedCurrentValue, | ||
uint8_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
bool core_util_atomic_cas_ptr | ( | void *volatile * | ptr, |
void ** | expectedCurrentValue, | ||
void * | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
Definition at line 778 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_s16 | ( | volatile int16_t * | ptr, |
int16_t * | expectedCurrentValue, | ||
int16_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
Definition at line 765 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_s32 | ( | volatile int32_t * | ptr, |
int32_t * | expectedCurrentValue, | ||
int32_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
Definition at line 765 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_s64 | ( | volatile int64_t * | ptr, |
int64_t * | expectedCurrentValue, | ||
int64_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
Definition at line 765 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_cas_s8 | ( | volatile int8_t * | ptr, |
int8_t * | expectedCurrentValue, | ||
int8_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
Definition at line 765 of file mbed_atomic_impl.h.
bool core_util_atomic_cas_u16 | ( | volatile uint16_t * | ptr, |
uint16_t * | expectedCurrentValue, | ||
uint16_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
bool core_util_atomic_cas_u32 | ( | volatile uint32_t * | ptr, |
uint32_t * | expectedCurrentValue, | ||
uint32_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
bool core_util_atomic_cas_u64 | ( | volatile uint64_t * | ptr, |
uint64_t * | expectedCurrentValue, | ||
uint64_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
bool core_util_atomic_cas_u8 | ( | volatile uint8_t * | ptr, |
uint8_t * | expectedCurrentValue, | ||
uint8_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = atomic_load(p) while not done { done = atomic_cas(p, &value, value + a) // *value gets updated automatically until success } return value + a }
However, if the call is made in a loop like this, the atomic_compare_exchange_weak functions are to be preferred.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_bool | ( | volatile bool * | ptr, |
bool * | expectedCurrentValue, | ||
bool | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
Definition at line 810 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_bool | ( | volatile bool * | ptr, |
bool * | expectedCurrentValue, | ||
bool | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 815 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_ptr | ( | void *volatile * | ptr, |
void ** | expectedCurrentValue, | ||
void * | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 835 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_s16 | ( | volatile int16_t * | ptr, |
int16_t * | expectedCurrentValue, | ||
int16_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 766 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_s32 | ( | volatile int32_t * | ptr, |
int32_t * | expectedCurrentValue, | ||
int32_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 766 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_s64 | ( | volatile int64_t * | ptr, |
int64_t * | expectedCurrentValue, | ||
int64_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 766 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_s8 | ( | volatile int8_t * | ptr, |
int8_t * | expectedCurrentValue, | ||
int8_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
Definition at line 766 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_u16 | ( | volatile uint16_t * | ptr, |
uint16_t * | expectedCurrentValue, | ||
uint16_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_u32 | ( | volatile uint32_t * | ptr, |
uint32_t * | expectedCurrentValue, | ||
uint32_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_u64 | ( | volatile uint64_t * | ptr, |
uint64_t * | expectedCurrentValue, | ||
uint64_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_explicit_u8 | ( | volatile uint8_t * | ptr, |
uint8_t * | expectedCurrentValue, | ||
uint8_t | desiredValue, | ||
mbed_memory_order | success, | ||
mbed_memory_order | failure | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
success | memory ordering constraint for successful exchange |
failure | memory ordering constraint for failure |
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_ptr | ( | void *volatile * | ptr, |
void ** | expectedCurrentValue, | ||
void * | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
Definition at line 820 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_s16 | ( | volatile int16_t * | ptr, |
int16_t * | expectedCurrentValue, | ||
int16_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
Definition at line 766 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_s32 | ( | volatile int32_t * | ptr, |
int32_t * | expectedCurrentValue, | ||
int32_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
Definition at line 766 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_s64 | ( | volatile int64_t * | ptr, |
int64_t * | expectedCurrentValue, | ||
int64_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
Definition at line 766 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_compare_exchange_weak_s8 | ( | volatile int8_t * | ptr, |
int8_t * | expectedCurrentValue, | ||
int8_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
Definition at line 766 of file mbed_atomic_impl.h.
bool core_util_atomic_compare_exchange_weak_u16 | ( | volatile uint16_t * | ptr, |
uint16_t * | expectedCurrentValue, | ||
uint16_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
bool core_util_atomic_compare_exchange_weak_u32 | ( | volatile uint32_t * | ptr, |
uint32_t * | expectedCurrentValue, | ||
uint32_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
bool core_util_atomic_compare_exchange_weak_u64 | ( | volatile uint64_t * | ptr, |
uint64_t * | expectedCurrentValue, | ||
uint64_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
bool core_util_atomic_compare_exchange_weak_u8 | ( | volatile uint8_t * | ptr, |
uint8_t * | expectedCurrentValue, | ||
uint8_t | desiredValue | ||
) |
Atomic compare and set.
It compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail due to a mismatched expectedCurrentValue.
Refer to https://en.wikipedia.org/wiki/Compare-and-set [which may redirect you to the article on compare-and swap].
ptr | The target memory location. | |
[in,out] | expectedCurrentValue | A pointer to some location holding the expected current value of the data being set atomically. The computed 'desiredValue' should be a function of this current value. |
[in] | desiredValue | The new value computed based on '*expectedCurrentValue'. |
pseudocode: function cas(p : pointer to int, old : pointer to int, new : int) returns bool { if *p != *old or spurious failure { *old = *p return false } *p = new return true }
function incr(p : pointer to int, a : int) returns int { done = false value = *p // This fetch operation need not be atomic. while not done { done = atomic_compare_exchange_weak(p, &value, value + a) // *value gets updated automatically until success } return value + a }
void* core_util_atomic_decr_ptr | ( | void *volatile * | valuePtr, |
ptrdiff_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
Definition at line 923 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_decr_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
Definition at line 878 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int32_t core_util_atomic_decr_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
Definition at line 878 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int64_t core_util_atomic_decr_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
Definition at line 878 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_decr_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
Definition at line 878 of file mbed_atomic_impl.h.
uint16_t core_util_atomic_decr_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
uint32_t core_util_atomic_decr_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
uint64_t core_util_atomic_decr_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
uint8_t core_util_atomic_decr_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | delta | ||
) |
Atomic decrement.
valuePtr | Target memory location being decremented. |
delta | The amount being decremented. |
MBED_FORCEINLINE bool core_util_atomic_exchange_bool | ( | volatile bool * | valuePtr, |
bool | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 886 of file mbed_atomic_impl.h.
MBED_FORCEINLINE bool core_util_atomic_exchange_explicit_bool | ( | volatile bool * | valuePtr, |
bool | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 891 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void* core_util_atomic_exchange_explicit_ptr | ( | void *volatile * | valuePtr, |
void * | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 905 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_exchange_explicit_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 882 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int32_t core_util_atomic_exchange_explicit_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 882 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int64_t core_util_atomic_exchange_explicit_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 882 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_exchange_explicit_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 882 of file mbed_atomic_impl.h.
MBED_FORCEINLINE uint16_t core_util_atomic_exchange_explicit_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
MBED_FORCEINLINE uint32_t core_util_atomic_exchange_explicit_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
MBED_FORCEINLINE uint64_t core_util_atomic_exchange_explicit_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
MBED_FORCEINLINE uint8_t core_util_atomic_exchange_explicit_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
void* core_util_atomic_exchange_ptr | ( | void *volatile * | valuePtr, |
void * | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 896 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_exchange_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 876 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int32_t core_util_atomic_exchange_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 876 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int64_t core_util_atomic_exchange_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 876 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_exchange_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 876 of file mbed_atomic_impl.h.
uint16_t core_util_atomic_exchange_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
uint32_t core_util_atomic_exchange_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
uint64_t core_util_atomic_exchange_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
uint8_t core_util_atomic_exchange_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | desiredValue | ||
) |
Atomic exchange.
valuePtr | Target memory location. |
desiredValue | The value to store. |
MBED_FORCEINLINE void* core_util_atomic_fetch_add_explicit_ptr | ( | void *volatile * | valuePtr, |
ptrdiff_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
Definition at line 941 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_fetch_add_explicit_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
Definition at line 883 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int32_t core_util_atomic_fetch_add_explicit_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
Definition at line 883 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int64_t core_util_atomic_fetch_add_explicit_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
Definition at line 883 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_fetch_add_explicit_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
Definition at line 883 of file mbed_atomic_impl.h.
MBED_FORCEINLINE uint16_t core_util_atomic_fetch_add_explicit_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
MBED_FORCEINLINE uint32_t core_util_atomic_fetch_add_explicit_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
MBED_FORCEINLINE uint64_t core_util_atomic_fetch_add_explicit_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
MBED_FORCEINLINE uint8_t core_util_atomic_fetch_add_explicit_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
order | memory ordering constraint |
MBED_FORCEINLINE void* core_util_atomic_fetch_add_ptr | ( | void *volatile * | valuePtr, |
ptrdiff_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
Definition at line 932 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_fetch_add_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
Definition at line 879 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int32_t core_util_atomic_fetch_add_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
Definition at line 879 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int64_t core_util_atomic_fetch_add_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
Definition at line 879 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_fetch_add_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
Definition at line 879 of file mbed_atomic_impl.h.
uint16_t core_util_atomic_fetch_add_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
uint32_t core_util_atomic_fetch_add_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
uint64_t core_util_atomic_fetch_add_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
uint8_t core_util_atomic_fetch_add_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg | ||
) |
Atomic add.
valuePtr | Target memory location being modified. |
arg | The argument for the addition. |
MBED_FORCEINLINE uint16_t core_util_atomic_fetch_and_explicit_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise and.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint32_t core_util_atomic_fetch_and_explicit_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise and.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint64_t core_util_atomic_fetch_and_explicit_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise and.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint8_t core_util_atomic_fetch_and_explicit_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise and.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
uint16_t core_util_atomic_fetch_and_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg | ||
) |
Atomic bitwise and.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint32_t core_util_atomic_fetch_and_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg | ||
) |
Atomic bitwise and.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint64_t core_util_atomic_fetch_and_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg | ||
) |
Atomic bitwise and.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint8_t core_util_atomic_fetch_and_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg | ||
) |
Atomic bitwise and.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
MBED_FORCEINLINE uint16_t core_util_atomic_fetch_or_explicit_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise inclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint32_t core_util_atomic_fetch_or_explicit_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise inclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint64_t core_util_atomic_fetch_or_explicit_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise inclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint8_t core_util_atomic_fetch_or_explicit_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise inclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
uint16_t core_util_atomic_fetch_or_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg | ||
) |
Atomic bitwise inclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint32_t core_util_atomic_fetch_or_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg | ||
) |
Atomic bitwise inclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint64_t core_util_atomic_fetch_or_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg | ||
) |
Atomic bitwise inclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint8_t core_util_atomic_fetch_or_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg | ||
) |
Atomic bitwise inclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
MBED_FORCEINLINE void* core_util_atomic_fetch_sub_explicit_ptr | ( | void *volatile * | valuePtr, |
ptrdiff_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
Definition at line 959 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_fetch_sub_explicit_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
Definition at line 884 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int32_t core_util_atomic_fetch_sub_explicit_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
Definition at line 884 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int64_t core_util_atomic_fetch_sub_explicit_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
Definition at line 884 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_fetch_sub_explicit_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
Definition at line 884 of file mbed_atomic_impl.h.
MBED_FORCEINLINE uint16_t core_util_atomic_fetch_sub_explicit_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
MBED_FORCEINLINE uint32_t core_util_atomic_fetch_sub_explicit_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
MBED_FORCEINLINE uint64_t core_util_atomic_fetch_sub_explicit_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
MBED_FORCEINLINE uint8_t core_util_atomic_fetch_sub_explicit_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
order | memory ordering constraint |
MBED_FORCEINLINE void* core_util_atomic_fetch_sub_ptr | ( | void *volatile * | valuePtr, |
ptrdiff_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
Definition at line 950 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_fetch_sub_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
Definition at line 880 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int32_t core_util_atomic_fetch_sub_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
Definition at line 880 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int64_t core_util_atomic_fetch_sub_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
Definition at line 880 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_fetch_sub_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
Definition at line 880 of file mbed_atomic_impl.h.
uint16_t core_util_atomic_fetch_sub_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
uint32_t core_util_atomic_fetch_sub_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
uint64_t core_util_atomic_fetch_sub_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
uint8_t core_util_atomic_fetch_sub_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg | ||
) |
Atomic subtract.
valuePtr | Target memory location being modified. |
arg | The argument for the subtraction. |
MBED_FORCEINLINE uint16_t core_util_atomic_fetch_xor_explicit_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise exclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint32_t core_util_atomic_fetch_xor_explicit_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise exclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint64_t core_util_atomic_fetch_xor_explicit_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise exclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
MBED_FORCEINLINE uint8_t core_util_atomic_fetch_xor_explicit_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg, | ||
mbed_memory_order | order | ||
) |
Atomic bitwise exclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
order | memory ordering constraint |
uint16_t core_util_atomic_fetch_xor_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | arg | ||
) |
Atomic bitwise exclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint32_t core_util_atomic_fetch_xor_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | arg | ||
) |
Atomic bitwise exclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint64_t core_util_atomic_fetch_xor_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | arg | ||
) |
Atomic bitwise exclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
uint8_t core_util_atomic_fetch_xor_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | arg | ||
) |
Atomic bitwise exclusive or.
valuePtr | Target memory location being modified. |
arg | The argument for the bitwise operation. |
MBED_FORCEINLINE void core_util_atomic_flag_clear | ( | volatile core_util_atomic_flag * | flagPtr | ) |
Atomic clear.
flagPtr | Target flag being cleared. |
Definition at line 671 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_flag_clear_explicit | ( | volatile core_util_atomic_flag * | flagPtr, |
mbed_memory_order | order | ||
) |
\ copydoc core_util_atomic_flag_clear
order | memory ordering constraint |
Definition at line 678 of file mbed_atomic_impl.h.
bool core_util_atomic_flag_test_and_set | ( | volatile core_util_atomic_flag * | flagPtr | ) |
Atomic test and set.
Atomically tests then sets the flag to true, returning the previous value.
flagPtr | Target flag being tested and set. |
MBED_FORCEINLINE bool core_util_atomic_flag_test_and_set_explicit | ( | volatile core_util_atomic_flag * | valuePtr, |
mbed_memory_order | order | ||
) |
\ copydoc core_util_atomic_flag_test_and_set
order | memory ordering constraint |
Definition at line 630 of file mbed_atomic_impl.h.
void* core_util_atomic_incr_ptr | ( | void *volatile * | valuePtr, |
ptrdiff_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
Definition at line 914 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_incr_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
Definition at line 877 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int32_t core_util_atomic_incr_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
Definition at line 877 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int64_t core_util_atomic_incr_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
Definition at line 877 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_incr_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
Definition at line 877 of file mbed_atomic_impl.h.
uint16_t core_util_atomic_incr_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
uint32_t core_util_atomic_incr_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
uint64_t core_util_atomic_incr_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
uint8_t core_util_atomic_incr_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | delta | ||
) |
Atomic increment.
valuePtr | Target memory location being incremented. |
delta | The amount being incremented. |
MBED_FORCEINLINE bool core_util_atomic_load_bool | ( | const volatile bool * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
MBED_FORCEINLINE bool core_util_atomic_load_explicit_bool | ( | const volatile bool * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
MBED_FORCEINLINE void* core_util_atomic_load_explicit_ptr | ( | void *const volatile * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
Definition at line 725 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_load_explicit_s16 | ( | const volatile int16_t * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
order | memory ordering constraint |
MBED_FORCEINLINE int32_t core_util_atomic_load_explicit_s32 | ( | const volatile int32_t * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
order | memory ordering constraint |
MBED_FORCEINLINE int64_t core_util_atomic_load_explicit_s64 | ( | const volatile int64_t * | valuePtr, |
MBED_UNUSED mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
Definition at line 977 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_load_explicit_s8 | ( | const volatile int8_t * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
order | memory ordering constraint |
MBED_FORCEINLINE uint16_t core_util_atomic_load_explicit_u16 | ( | const volatile uint16_t * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
order | memory ordering constraint |
MBED_FORCEINLINE uint32_t core_util_atomic_load_explicit_u32 | ( | const volatile uint32_t * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
order | memory ordering constraint |
MBED_FORCEINLINE uint64_t core_util_atomic_load_explicit_u64 | ( | const volatile uint64_t * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
order | memory ordering constraint |
MBED_FORCEINLINE uint8_t core_util_atomic_load_explicit_u8 | ( | const volatile uint8_t * | valuePtr, |
mbed_memory_order | order | ||
) |
Atomic load.
valuePtr | Target memory location. |
order | memory ordering constraint |
MBED_FORCEINLINE void* core_util_atomic_load_ptr | ( | void *const volatile * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
Definition at line 725 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int16_t core_util_atomic_load_s16 | ( | const volatile int16_t * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
MBED_FORCEINLINE int32_t core_util_atomic_load_s32 | ( | const volatile int32_t * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
MBED_FORCEINLINE int64_t core_util_atomic_load_s64 | ( | const volatile int64_t * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
Definition at line 733 of file mbed_atomic_impl.h.
MBED_FORCEINLINE int8_t core_util_atomic_load_s8 | ( | const volatile int8_t * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
MBED_FORCEINLINE uint16_t core_util_atomic_load_u16 | ( | const volatile uint16_t * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
MBED_FORCEINLINE uint32_t core_util_atomic_load_u32 | ( | const volatile uint32_t * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
uint64_t core_util_atomic_load_u64 | ( | const volatile uint64_t * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
MBED_FORCEINLINE uint8_t core_util_atomic_load_u8 | ( | const volatile uint8_t * | valuePtr | ) |
Atomic load.
valuePtr | Target memory location. |
MBED_FORCEINLINE void core_util_atomic_store_bool | ( | volatile bool * | valuePtr, |
bool | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 724 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_explicit_bool | ( | volatile bool * | valuePtr, |
bool | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 724 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_explicit_ptr | ( | void *volatile * | valuePtr, |
void * | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 725 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_explicit_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 722 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_explicit_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 723 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_explicit_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
MBED_FORCEINLINE void core_util_atomic_store_explicit_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 721 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_explicit_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 719 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_explicit_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 720 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_explicit_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
MBED_FORCEINLINE void core_util_atomic_store_explicit_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | desiredValue, | ||
mbed_memory_order | order | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
order | memory ordering constraint |
Definition at line 718 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_ptr | ( | void *volatile * | valuePtr, |
void * | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 725 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_s16 | ( | volatile int16_t * | valuePtr, |
int16_t | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 722 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_s32 | ( | volatile int32_t * | valuePtr, |
int32_t | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 723 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_s64 | ( | volatile int64_t * | valuePtr, |
int64_t | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 738 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_s8 | ( | volatile int8_t * | valuePtr, |
int8_t | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 721 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_u16 | ( | volatile uint16_t * | valuePtr, |
uint16_t | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 719 of file mbed_atomic_impl.h.
MBED_FORCEINLINE void core_util_atomic_store_u32 | ( | volatile uint32_t * | valuePtr, |
uint32_t | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 720 of file mbed_atomic_impl.h.
void core_util_atomic_store_u64 | ( | volatile uint64_t * | valuePtr, |
uint64_t | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
MBED_FORCEINLINE void core_util_atomic_store_u8 | ( | volatile uint8_t * | valuePtr, |
uint8_t | desiredValue | ||
) |
Atomic store.
valuePtr | Target memory location. |
desiredValue | The value to store. |
Definition at line 718 of file mbed_atomic_impl.h.