Function sdl2_sys::SDL_AtomicCAS

source ·
pub unsafe extern "C" fn SDL_AtomicCAS(
    a: *mut SDL_atomic_t,
    oldval: c_int,
    newval: c_int
) -> SDL_bool
Expand description

Set an atomic variable 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!

\param a a pointer to an SDL_atomic_t variable to be modified \param oldval the old value \param newval the new value \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.

\since This function is available since SDL 2.0.0.

\sa SDL_AtomicCASPtr \sa SDL_AtomicGet \sa SDL_AtomicSet