sdl3/sdl_atomic library

Functions

sdlAddAtomicInt(Pointer<SdlAtomicInt> a, int v) → int atomic
Add to an atomic variable.
sdlAddAtomicU32(Pointer<SdlAtomicU32> a, int v) → int atomic
Add to an atomic variable.
sdlCompareAndSwapAtomicInt(Pointer<SdlAtomicInt> a, int oldval, int newval) → bool atomic
Set an atomic variable to a new value if it is currently an old value.
sdlCompareAndSwapAtomicPointer(Pointer<Pointer<Void>> a, Pointer<Void> oldval, Pointer<Void> newval) → bool atomic
Set a pointer to a new value if it is currently an old value.
sdlCompareAndSwapAtomicU32(Pointer<SdlAtomicU32> a, int oldval, int newval) → bool atomic
Set an atomic variable to a new value if it is currently an old value.
sdlGetAtomicInt(Pointer<SdlAtomicInt> a) → int atomic
Get the value of an atomic variable.
sdlGetAtomicPointer(Pointer<Pointer<Void>> a) → Pointer<Void> atomic
Get the value of a pointer atomically.
sdlGetAtomicU32(Pointer<SdlAtomicU32> a) → int atomic
Get the value of an atomic variable.
sdlLockSpinlock(Pointer<Int32> lock) → void atomic
Lock a spin lock by setting it to a non-zero value.
sdlMemoryBarrierAcquireFunction() → void atomic
Insert a memory acquire barrier (function version).
sdlMemoryBarrierReleaseFunction() → void atomic
Insert a memory release barrier (function version).
sdlSetAtomicInt(Pointer<SdlAtomicInt> a, int v) → int atomic
Set an atomic variable to a value.
sdlSetAtomicPointer(Pointer<Pointer<Void>> a, Pointer<Void> v) → Pointer<Void> atomic
Set a pointer to a value atomically.
sdlSetAtomicU32(Pointer<SdlAtomicU32> a, int v) → int atomic
Set an atomic variable to a value.
sdlTryLockSpinlock(Pointer<Int32> lock) → bool atomic
Try to lock a spin lock by setting it to a non-zero value.
sdlUnlockSpinlock(Pointer<Int32> lock) → void atomic
Unlock a spin lock by setting it to 0.