Function SDL_AtomicTryLock

pub unsafe extern "C" fn SDL_AtomicTryLock(lock: *mut i32) -> SDL_bool
Available on crate feature dep_sdl2 only.
Expand description

Try to lock a spin lock by setting it to a non-zero value.

Please note that spinlocks are dangerous if you don’t know what you’re doing. Please be careful using any sort of spinlock!

\param lock a pointer to a lock variable \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held.

\since This function is available since SDL 2.0.0.

\sa SDL_AtomicLock \sa SDL_AtomicUnlock