#include "mercury_util_config.h"
#include <opa_primitives.h>
Go to the source code of this file.
static HG_UTIL_INLINE void hg_atomic_set32 |
( |
hg_atomic_int32_t * |
ptr, |
|
|
hg_util_int32_t |
value |
|
) |
| |
|
static |
Set atomic value (32-bit integer).
- Parameters
-
ptr | [OUT] pointer to an atomic32 integer |
value | [IN] value |
Definition at line 38 of file mercury_atomic.h.
Get atomic value (32-bit integer).
- Parameters
-
ptr | [OUT] pointer to an atomic32 integer |
- Returns
- Value of the atomic integer
Definition at line 55 of file mercury_atomic.h.
Increment atomic value (32-bit integer).
- Parameters
-
ptr | [IN/OUT] pointer to an atomic32 integer |
- Returns
- Incremented value
Definition at line 76 of file mercury_atomic.h.
Decrement atomic value (32-bit integer).
- Parameters
-
ptr | [IN/OUT] pointer to an atomic32 integer |
- Returns
- Decremented value
Definition at line 99 of file mercury_atomic.h.
static HG_UTIL_INLINE hg_util_bool_t hg_atomic_cas32 |
( |
hg_atomic_int32_t * |
ptr, |
|
|
hg_util_int32_t |
compare_value, |
|
|
hg_util_int32_t |
swap_value |
|
) |
| |
|
static |
Compare and swap values (32-bit integer).
- Parameters
-
ptr | [IN/OUT] pointer to an atomic32 integer |
compare_value | [IN] value to compare to |
swap_value | [IN] value to swap with if ptr value is equal to compare value |
- Returns
- HG_UTIL_TRUE if swapped or HG_UTIL_FALSE
Definition at line 125 of file mercury_atomic.h.