This module implements C11 stdatomic.h simplified API. At this point only Cortex-M3/M4 cores are supported (LDREX/STREX instructions). Atomic types are limited to
nrf_atomic_u32_t
and
nrf_atomic_flag_t
.
More...
|
|
|
#define
|
NRF_ATOMIC_USE_BUILD_IN
0
|
|
|
|
|
|
static uint32_t
|
nrf_atomic_u32_fetch_store
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Stores value to an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_store
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Stores value to an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_fetch_or
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Logical OR operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_or
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Logical OR operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_fetch_and
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Logical AND operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_and
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Logical AND operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_fetch_xor
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Logical XOR operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_xor
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Logical XOR operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_fetch_add
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Arithmetic ADD operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_add
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Arithmetic ADD operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_fetch_sub
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Arithmetic SUB operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_u32_sub
(
nrf_atomic_u32_t
*p_data, uint32_t value)
|
|
|
Arithmetic SUB operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_flag_set_fetch
(
nrf_atomic_flag_t
*p_data)
|
|
|
Logic one bit flag set operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_flag_set
(
nrf_atomic_flag_t
*p_data)
|
|
|
Logic one bit flag set operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_flag_clear_fetch
(
nrf_atomic_flag_t
*p_data)
|
|
|
Logic one bit flag clear operation on an atomic object.
More...
|
|
|
|
static uint32_t
|
nrf_atomic_flag_clear
(
nrf_atomic_flag_t
*p_data)
|
|
|
Logic one bit flag clear operation on an atomic object.
More...
|
|
|
This module implements C11 stdatomic.h simplified API. At this point only Cortex-M3/M4 cores are supported (LDREX/STREX instructions). Atomic types are limited to
nrf_atomic_u32_t
and
nrf_atomic_flag_t
.
Logic one bit flag clear operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic flag memory pointer
|
-
Returns
-
New flag value
Logic one bit flag clear operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic flag memory pointer
|
-
Returns
-
Old flag value
Logic one bit flag set operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic flag memory pointer
|
-
Returns
-
New flag value
Logic one bit flag set operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic flag memory pointer
|
-
Returns
-
Old flag value
|
static uint32_t nrf_atomic_u32_add
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Arithmetic ADD operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand ADD operation
|
-
Returns
-
New value stored into atomic object
|
static uint32_t nrf_atomic_u32_and
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Logical AND operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand AND operation
|
-
Returns
-
New value stored into atomic object
|
static uint32_t nrf_atomic_u32_fetch_add
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Arithmetic ADD operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand ADD operation
|
-
Returns
-
Old value stored into atomic object
|
static uint32_t nrf_atomic_u32_fetch_and
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Logical AND operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand AND operation
|
-
Returns
-
Old value stored into atomic object
|
static uint32_t nrf_atomic_u32_fetch_or
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Logical OR operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand OR operation
|
-
Returns
-
Old value stored into atomic object
|
static uint32_t nrf_atomic_u32_fetch_store
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Stores value to an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value to store
|
-
Returns
-
Old value stored into atomic object
|
static uint32_t nrf_atomic_u32_fetch_sub
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Arithmetic SUB operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand SUB operation
|
-
Returns
-
Old value stored into atomic object
|
static uint32_t nrf_atomic_u32_fetch_xor
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Logical XOR operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand XOR operation
|
-
Returns
-
Old value stored into atomic object
|
static uint32_t nrf_atomic_u32_or
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Logical OR operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand OR operation
|
-
Returns
-
New value stored into atomic object
|
static uint32_t nrf_atomic_u32_store
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Stores value to an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value to store
|
-
Returns
-
New value stored into atomic object
|
static uint32_t nrf_atomic_u32_sub
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Arithmetic SUB operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand SUB operation
|
-
Returns
-
New value stored into atomic object
|
static uint32_t nrf_atomic_u32_xor
|
(
|
nrf_atomic_u32_t
*
|
p_data
,
|
|
|
|
uint32_t
|
value
|
|
|
)
|
|
|
|
inline
static
|
Logical XOR operation on an atomic object.
-
Parameters
-
|
[in]
|
p_data
|
Atomic memory pointer
|
|
[in]
|
value
|
Value of second operand XOR operation
|
-
Returns
-
New value stored into atomic object