API Reference Manual  1.45.0
api/spec/atomic.h File Reference

ODP atomic operations. More...

#include <odp/visibility_begin.h>
#include <odp/visibility_end.h>
Include dependency graph for api/spec/atomic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  odp_atomic_op_t
 Atomic operations. More...
 

Typedefs

typedef union odp_atomic_op_t odp_atomic_op_t
 Atomic operations. More...
 

Functions

void odp_atomic_init_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Initialize atomic uint32 variable. More...
 
uint32_t odp_atomic_load_u32 (odp_atomic_u32_t *atom)
 Load value of atomic uint32 variable. More...
 
void odp_atomic_store_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Store value to atomic uint32 variable. More...
 
uint32_t odp_atomic_fetch_add_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Fetch and add to atomic uint32 variable. More...
 
void odp_atomic_add_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Add to atomic uint32 variable. More...
 
uint32_t odp_atomic_fetch_sub_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Fetch and subtract from atomic uint32 variable. More...
 
void odp_atomic_sub_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Subtract from atomic uint32 variable. More...
 
uint32_t odp_atomic_fetch_inc_u32 (odp_atomic_u32_t *atom)
 Fetch and increment atomic uint32 variable. More...
 
void odp_atomic_inc_u32 (odp_atomic_u32_t *atom)
 Increment atomic uint32 variable. More...
 
uint32_t odp_atomic_fetch_dec_u32 (odp_atomic_u32_t *atom)
 Fetch and decrement atomic uint32 variable. More...
 
void odp_atomic_dec_u32 (odp_atomic_u32_t *atom)
 Decrement atomic uint32 variable. More...
 
void odp_atomic_max_u32 (odp_atomic_u32_t *atom, uint32_t new_max)
 Update maximum value of atomic uint32 variable. More...
 
void odp_atomic_min_u32 (odp_atomic_u32_t *atom, uint32_t new_min)
 Update minimum value of atomic uint32 variable. More...
 
int odp_atomic_cas_u32 (odp_atomic_u32_t *atom, uint32_t *old_val, uint32_t new_val)
 Compare and swap atomic uint32 variable. More...
 
uint32_t odp_atomic_xchg_u32 (odp_atomic_u32_t *atom, uint32_t new_val)
 Exchange value of atomic uint32 variable. More...
 
void odp_atomic_init_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Initialize atomic uint64 variable. More...
 
uint64_t odp_atomic_load_u64 (odp_atomic_u64_t *atom)
 Load value of atomic uint64 variable. More...
 
void odp_atomic_store_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Store value to atomic uint64 variable. More...
 
uint64_t odp_atomic_fetch_add_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Fetch and add to atomic uint64 variable. More...
 
void odp_atomic_add_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Add to atomic uint64 variable. More...
 
uint64_t odp_atomic_fetch_sub_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Fetch and subtract from atomic uint64 variable. More...
 
void odp_atomic_sub_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Subtract from atomic uint64 variable. More...
 
uint64_t odp_atomic_fetch_inc_u64 (odp_atomic_u64_t *atom)
 Fetch and increment atomic uint64 variable. More...
 
void odp_atomic_inc_u64 (odp_atomic_u64_t *atom)
 Increment atomic uint64 variable. More...
 
uint64_t odp_atomic_fetch_dec_u64 (odp_atomic_u64_t *atom)
 Fetch and decrement atomic uint64 variable. More...
 
void odp_atomic_dec_u64 (odp_atomic_u64_t *atom)
 Decrement atomic uint64 variable. More...
 
void odp_atomic_max_u64 (odp_atomic_u64_t *atom, uint64_t new_max)
 Update maximum value of atomic uint64 variable. More...
 
void odp_atomic_min_u64 (odp_atomic_u64_t *atom, uint64_t new_min)
 Update minimum value of atomic uint64 variable. More...
 
int odp_atomic_cas_u64 (odp_atomic_u64_t *atom, uint64_t *old_val, uint64_t new_val)
 Compare and swap atomic uint64 variable. More...
 
uint64_t odp_atomic_xchg_u64 (odp_atomic_u64_t *atom, uint64_t new_val)
 Exchange value of atomic uint64 variable. More...
 
void odp_atomic_init_u128 (odp_atomic_u128_t *atom, odp_u128_t val)
 Initialize atomic odp_u128_t variable. More...
 
odp_u128_t odp_atomic_load_u128 (odp_atomic_u128_t *atom)
 Load value of atomic odp_u128_t variable. More...
 
void odp_atomic_store_u128 (odp_atomic_u128_t *atom, odp_u128_t val)
 Store value to atomic odp_u128_t variable. More...
 
int odp_atomic_cas_u128 (odp_atomic_u128_t *atom, odp_u128_t *old_val, odp_u128_t new_val)
 Compare and swap atomic odp_u128_t variable. More...
 
uint32_t odp_atomic_load_acq_u32 (odp_atomic_u32_t *atom)
 Load value of atomic uint32 variable using ACQUIRE memory ordering. More...
 
void odp_atomic_store_rel_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Store value to atomic uint32 variable using RELEASE memory ordering. More...
 
void odp_atomic_add_rel_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Add to atomic uint32 variable using RELEASE memory ordering. More...
 
void odp_atomic_sub_rel_u32 (odp_atomic_u32_t *atom, uint32_t val)
 Subtract from atomic uint32 variable using RELEASE memory ordering. More...
 
int odp_atomic_cas_acq_u32 (odp_atomic_u32_t *atom, uint32_t *old_val, uint32_t new_val)
 Compare and swap atomic uint32 variable using ACQUIRE memory ordering. More...
 
int odp_atomic_cas_rel_u32 (odp_atomic_u32_t *atom, uint32_t *old_val, uint32_t new_val)
 Compare and swap atomic uint32 variable using RELEASE memory ordering. More...
 
int odp_atomic_cas_acq_rel_u32 (odp_atomic_u32_t *atom, uint32_t *old_val, uint32_t new_val)
 Compare and swap atomic uint32 variable using ACQUIRE-and-RELEASE memory ordering. More...
 
uint64_t odp_atomic_load_acq_u64 (odp_atomic_u64_t *atom)
 Load value of atomic uint64 variable using ACQUIRE memory ordering. More...
 
void odp_atomic_store_rel_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Store value to atomic uint64 variable using RELEASE memory ordering. More...
 
void odp_atomic_add_rel_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Add to atomic uint64 variable using RELEASE memory ordering. More...
 
void odp_atomic_sub_rel_u64 (odp_atomic_u64_t *atom, uint64_t val)
 Subtract from atomic uint64 variable using RELEASE memory ordering. More...
 
int odp_atomic_cas_acq_u64 (odp_atomic_u64_t *atom, uint64_t *old_val, uint64_t new_val)
 Compare and swap atomic uint64 variable using ACQUIRE memory ordering. More...
 
int odp_atomic_cas_rel_u64 (odp_atomic_u64_t *atom, uint64_t *old_val, uint64_t new_val)
 Compare and swap atomic uint64 variable using RELEASE memory ordering. More...
 
int odp_atomic_cas_acq_rel_u64 (odp_atomic_u64_t *atom, uint64_t *old_val, uint64_t new_val)
 Compare and swap atomic uint64 variable using ACQUIRE-and-RELEASE memory ordering. More...
 
int odp_atomic_lock_free_u64 (odp_atomic_op_t *atomic_op)
 Query which atomic uint64 operations are lock-free. More...
 
int odp_atomic_cas_acq_u128 (odp_atomic_u128_t *atom, odp_u128_t *old_val, odp_u128_t new_val)
 Compare and swap atomic odp_u128_t variable using ACQUIRE memory ordering. More...
 
int odp_atomic_cas_rel_u128 (odp_atomic_u128_t *atom, odp_u128_t *old_val, odp_u128_t new_val)
 Compare and swap atomic odp_u128_t variable using RELEASE memory ordering. More...
 
int odp_atomic_cas_acq_rel_u128 (odp_atomic_u128_t *atom, odp_u128_t *old_val, odp_u128_t new_val)
 Compare and swap atomic odp_u128_t variable using ACQUIRE-and-RELEASE memory ordering. More...
 
int odp_atomic_lock_free_u128 (odp_atomic_op_t *atomic_op)
 Query which atomic odp_atomic_u128_t operations are lock-free. More...
 

Detailed Description

ODP atomic operations.

Definition in file api/spec/atomic.h.