logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_CreateMutex - Create a new mutex.

Availability

       This function is available since SDL 3.2.0.

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.

Header File

       Defined in SDL3/SDL_mutex.h

Name

       SDL_CreateMutex - Create a new mutex.

Return Value

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

See Also

(3), SDL_DestroyMutex(3), (3), SDL_LockMutex(3), (3), SDL_TryLockMutex(3), (3), SDL_UnlockMutex(3)

Simple Directmedia Layer                           SDL 3.2.10                                 SDL_CreateMutex(3)

Synopsis

#include"SDL3/SDL.h"SDL_Mutex*SDL_CreateMutex(void);

See Also