Function SDL_CompareAndSwapAtomicPointer
pub unsafe extern "C" fn SDL_CompareAndSwapAtomicPointer(
a: *mut *mut c_void,
oldval: *mut c_void,
newval: *mut c_void,
) -> bool
Available on crate feature
dep_sdl3
only.Expand description
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!
§Parameters
a
: a pointer to a pointer.oldval
: the old pointer value.newval
: the new pointer value.
§Return value
Returns true if the pointer was set, false otherwise.
§Thread safety
It is safe to call this function from any thread.
§Availability
This function is available since SDL 3.2.0.