Function SDL_TryLockSpinlock
pub unsafe extern "C" fn SDL_TryLockSpinlock(lock: *mut i32) -> bool
Available on crate feature
dep_sdl3
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!
§Parameters
lock
: a pointer to a lock variable.
§Return value
Returns true if the lock succeeded, false if the lock is already held.
§Thread safety
It is safe to call this function from any thread.
§Availability
This function is available since SDL 3.2.0.