SDL_CreateMutex - Man Page
Create a new mutex.
Synopsis
#include <SDL3/SDL_mutex.h> SDL_Mutex * SDL_CreateMutex(void);
Description
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
SDL_DestroyMutex(3), SDL_LockMutex(3), SDL_TryLockMutex(3), SDL_UnlockMutex(3)
Referenced By
SDL 3.2.16 Simple Directmedia Layer SDL3 FUNCTIONS