SDL_CompareAndSwapAtomicPointer

Set a pointer to a new value if it is currently an old value.

***Note: If you don't know what this function is for, you shouldn't use it!***

extern (C) nothrow @nogc extern
bool
SDL_CompareAndSwapAtomicPointer
(
void** a
,
void* oldval
,
void* newval
)

Parameters

a void**

a pointer to a pointer.

oldval void*

the old pointer value.

newval void*

the new pointer value.

Return Value

Type: bool

true if the pointer was set, false otherwise.

See Also

SDL_CompareAndSwapAtomicInt SDL_GetAtomicPointer SDL_SetAtomicPointer

Threadsafety: It is safe to call this function from any thread.

Meta

History

Available since SDL 3.2.0.