Atomic functions
Atomically adds to a 32 bits value
XS_EXPORT int32_t XSAtomicAdd32(
int32_t amount,
volatile int32_t *value );
The new value
Atomically adds to a 64 bits value
XS_EXPORT int64_t XSAtomicAdd64(
int64_t amount,
volatile int64_t *value );
The new value
Atomically compares and swaps a 32 bits value
XS_EXPORT bool XSAtomicCompareAndSwap32(
int32_t oldValue,
int32_t newValue,
volatile int32_t *value );
True if the comparison was equal and the swap occured
Atomically compares and swaps a 64 bits value
XS_EXPORT bool XSAtomicCompareAndSwap64(
int64_t oldValue,
int64_t newValue,
volatile int64_t *value );
True if the comparison was equal and the swap occured
Atomically compares and swaps a pointer value
XS_EXPORT bool XSAtomicCompareAndSwapPointer(
void *oldValue,
void *newValue,
void *volatile * value );
True if the comparison was equal and the swap occured
Atomically decrements a 32 bits value
XS_EXPORT int32_t XSAtomicDecrement32(
volatile int32_t *value );
The new value
Atomically decrements a 64 bits value
XS_EXPORT int64_t XSAtomicDecrement64(
volatile int64_t *value );
The new value
Atomically increments a 32 bits value
XS_EXPORT int32_t XSAtomicIncrement32(
volatile int32_t *value );
The new value
Atomically increments a 64 bits value
XS_EXPORT int64_t XSAtomicIncrement64(
volatile int64_t *value );
The new value
Atomically reads a 32 bits value
XS_EXPORT int32_t XSAtomicRead32(
volatile int32_t *value );
The 32 bits value
Atomically reads a 64 bits value
XS_EXPORT int64_t XSAtomicRead64(
volatile int64_t *value );
The 64 bits value
Atomically writes a 32 bits value
XS_EXPORT void XSAtomicWrite32(
int32_t newValue,
volatile int32_t *value );
Atomically writes a 64 bits value
XS_EXPORT void XSAtomicWrite64(
int64_t newValue,
volatile int64_t *value );