sdlCreateMutex function
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.
\returns the initialized and unlocked mutex or NULL on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.1.3.
\sa SDL_DestroyMutex \sa SDL_LockMutex \sa SDL_TryLockMutex \sa SDL_UnlockMutex
extern SDL_DECLSPEC SDL_Mutex * SDLCALL SDL_CreateMutex(void)
Implementation
Pointer<SdlMutex> sdlCreateMutex() {
final sdlCreateMutexLookupFunction = libSdl3.lookupFunction<
Pointer<SdlMutex> Function(),
Pointer<SdlMutex> Function()>('SDL_CreateMutex');
return sdlCreateMutexLookupFunction();
}