vsync / atomic / await_ptr.h
Atomic await functions for vatomicptr_t variables.
This file declares and documents the atomic await functions operating on vatomicptr_t variables.
Please do not include this file directly, instead use:
#include <vsync/atomic/await.h>
Functions
| Function | Description |
|---|---|
| vatomicptr_await_neq | Politely awaits the value pointed by a to be different than v. |
| vatomicptr_await_neq_acq | Politely awaits the value pointed by a to be different than v. |
| vatomicptr_await_neq_rlx | Politely awaits the value pointed by a to be different than v. |
| vatomicptr_await_eq | Politely awaits the value pointed by a to be equal to v. |
| vatomicptr_await_eq_acq | Politely awaits the value pointed by a to be equal to v. |
| vatomicptr_await_eq_rlx | Politely awaits the value pointed by a to be equal to v. |
| vatomicptr_await_eq_set | Politely awaits the value pointed by a to be equal to c, setting v to a once the condition is satisfied. |
| vatomicptr_await_eq_set_acq | Politely awaits the value pointed by a to be equal to c, setting v to a once the condition is satisfied. |
| vatomicptr_await_eq_set_rel | Politely awaits the value pointed by a to be equal to c, setting v to a once the condition is satisfied. |
| vatomicptr_await_eq_set_rlx | Politely awaits the value pointed by a to be equal to c, setting v to a once the condition is satisfied. |
| vatomicptr_await_neq_set | Politely awaits the value pointed by a to be different than c, setting v to a once the condition is satisfied. |
| vatomicptr_await_neq_set_acq | Politely awaits the value pointed by a to be different than c, setting v to a once the condition is satisfied. |
| vatomicptr_await_neq_set_rel | Politely awaits the value pointed by a to be different than c, setting v to a once the condition is satisfied. |
| vatomicptr_await_neq_set_rlx | Politely awaits the value pointed by a to be different than c, setting v to a once the condition is satisfied. |
Function vatomicptr_await_neq
static void* vatomicptr_await_neq(const vatomicptr_t *a, void *v)
Politely awaits the value pointed by a to be different than v.
The return value is the first read value that satisfies the condition, as if read with vatomicptr_read(a).
Parameters:
a: atomic variablev: value to compare
Returns: value satisfying conditon
Memory ordering: seq_cst
Function vatomicptr_await_neq_acq
static void* vatomicptr_await_neq_acq(const vatomicptr_t *a, void *v)
Politely awaits the value pointed by a to be different than v.
The return value is the first read value that satisfies the condition, as if read with vatomicptr_read(a).
Parameters:
a: atomic variablev: value to compare
Returns: value satisfying conditon
Memory ordering: acquire
Function vatomicptr_await_neq_rlx
static void* vatomicptr_await_neq_rlx(const vatomicptr_t *a, void *v)
Politely awaits the value pointed by a to be different than v.
The return value is the first read value that satisfies the condition, as if read with vatomicptr_read(a).
Parameters:
a: atomic variablev: value to compare
Returns: value satisfying conditon
Memory ordering: relaxed
Function vatomicptr_await_eq
static void* vatomicptr_await_eq(const vatomicptr_t *a, void *v)
Politely awaits the value pointed by a to be equal to v.
The return value is the first read value that satisfies the condition, as if read with vatomicptr_read(a).
Parameters:
a: atomic variablev: value to compare
Returns: last value before satisfying condition
Memory ordering: seq_cst
Function vatomicptr_await_eq_acq
static void* vatomicptr_await_eq_acq(const vatomicptr_t *a, void *v)
Politely awaits the value pointed by a to be equal to v.
The return value is the first read value that satisfies the condition, as if read with vatomicptr_read(a).
Parameters:
a: atomic variablev: value to compare
Returns: last value before satisfying condition
Memory ordering: acquire
Function vatomicptr_await_eq_rlx
static void* vatomicptr_await_eq_rlx(const vatomicptr_t *a, void *v)
Politely awaits the value pointed by a to be equal to v.
The return value is the first read value that satisfies the condition, as if read with vatomicptr_read(a).
Parameters:
a: atomic variablev: value to compare
Returns: last value before satisfying condition
Memory ordering: relaxed
Function vatomicptr_await_eq_set
static void* vatomicptr_await_eq_set(vatomicptr_t *a, void *c, void *v)
Politely awaits the value pointed by a to be equal to c, setting v to a once the condition is satisfied.
Parameters:
a: atomic variablec: value to comparev: value to apply the operation
Returns: old value
Memory ordering: seq_cst
Function vatomicptr_await_eq_set_acq
static void* vatomicptr_await_eq_set_acq(vatomicptr_t *a, void *c, void *v)
Politely awaits the value pointed by a to be equal to c, setting v to a once the condition is satisfied.
Parameters:
a: atomic variablec: value to comparev: value to apply the operation
Returns: old value
Memory ordering: acquire
Function vatomicptr_await_eq_set_rel
static void* vatomicptr_await_eq_set_rel(vatomicptr_t *a, void *c, void *v)
Politely awaits the value pointed by a to be equal to c, setting v to a once the condition is satisfied.
Parameters:
a: atomic variablec: value to comparev: value to apply the operation
Returns: old value
Memory ordering: release
Function vatomicptr_await_eq_set_rlx
static void* vatomicptr_await_eq_set_rlx(vatomicptr_t *a, void *c, void *v)
Politely awaits the value pointed by a to be equal to c, setting v to a once the condition is satisfied.
Parameters:
a: atomic variablec: value to comparev: value to apply the operation
Returns: old value
Memory ordering: relaxed
Function vatomicptr_await_neq_set
static void* vatomicptr_await_neq_set(vatomicptr_t *a, void *c, void *v)
Politely awaits the value pointed by a to be different than c, setting v to a once the condition is satisfied.
Parameters:
a: atomic variablec: value to comparev: value to apply the operation
Returns: old value
Memory ordering: seq_cst
Function vatomicptr_await_neq_set_acq
static void* vatomicptr_await_neq_set_acq(vatomicptr_t *a, void *c, void *v)
Politely awaits the value pointed by a to be different than c, setting v to a once the condition is satisfied.
Parameters:
a: atomic variablec: value to comparev: value to apply the operation
Returns: old value
Memory ordering: acquire
Function vatomicptr_await_neq_set_rel
static void* vatomicptr_await_neq_set_rel(vatomicptr_t *a, void *c, void *v)
Politely awaits the value pointed by a to be different than c, setting v to a once the condition is satisfied.
Parameters:
a: atomic variablec: value to comparev: value to apply the operation
Returns: old value
Memory ordering: release
Function vatomicptr_await_neq_set_rlx
static void* vatomicptr_await_neq_set_rlx(vatomicptr_t *a, void *c, void *v)
Politely awaits the value pointed by a to be different than c, setting v to a once the condition is satisfied.
Parameters:
a: atomic variablec: value to comparev: value to apply the operation
Returns: old value
Memory ordering: relaxed