Function SDL_CreateMutex

pub unsafe extern "C" fn SDL_CreateMutex() -> *mut SDL_Mutex
Available on crate feature dep_sdl3 only.
Expand description

Create a new mutex.

All newly-created mutexes begin in the unlocked state.

Calls to SDL_LockMutex() will not return while the mutex is locked by another thread. See SDL_TryLockMutex() to attempt to lock without blocking.

SDL mutexes are reentrant.

§Return value

Returns the initialized and unlocked mutex or NULL on failure; call SDL_GetError() for more information.

§Availability

This function is available since SDL 3.2.0.

§See also