A platform independent API for atomic integer operations.
More...
#include <stdint.h>
Go to the source code of this file.
A platform independent API for atomic integer operations.
◆ SOPC_Atomic_Int_Get()
int32_t SOPC_Atomic_Int_Get |
( |
int32_t * |
atomic | ) |
|
Returns the current value of an atomic integer variable.
- Parameters
-
atomic | The address of the atomic variable. |
- Returns
- The current value of the variable.
◆ SOPC_Atomic_Int_Set()
void SOPC_Atomic_Int_Set |
( |
int32_t * |
atomic, |
|
|
int32_t |
val |
|
) |
| |
Sets the value of an atomic integer variable.
- Parameters
-
atomic | The address of the atomic variable. |
val | The new value of the variable. |
◆ SOPC_Atomic_Int_Add()
int32_t SOPC_Atomic_Int_Add |
( |
int32_t * |
atomic, |
|
|
int32_t |
val |
|
) |
| |
Adds a value to an atomic integer variable.
- Parameters
-
atomic | The address of the atomic variable. |
val | The value to add to the variable. |
- Returns
- The old value (before the add) of the atomic variable.
◆ SOPC_Atomic_Ptr_Get()
void* SOPC_Atomic_Ptr_Get |
( |
void ** |
atomic | ) |
|
Returns the current value of an atomic pointer.
- Parameters
-
atomic | The address of the atomic pointer. |
- Returns
- The current value of the pointer.
◆ SOPC_Atomic_Ptr_Set()
void SOPC_Atomic_Ptr_Set |
( |
void ** |
atomic, |
|
|
void * |
val |
|
) |
| |
Sets the value of an atomic pointer variable.
- Parameters
-
atomic | The address of the atomic pointer. |
val | The new value of the pointer. |