include/SDL_mutex.h
changeset 417 04ec6995f75d
parent 337 9154ec9ca3d2
child 769 b8d311d90021
equal deleted inserted replaced
416:6b0363ceaba2 417:04ec6995f75d
    64 
    64 
    65 /* Lock the mutex  (Returns 0, or -1 on error) */
    65 /* Lock the mutex  (Returns 0, or -1 on error) */
    66 #define SDL_LockMutex(m)	SDL_mutexP(m)
    66 #define SDL_LockMutex(m)	SDL_mutexP(m)
    67 extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex *mutex);
    67 extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex *mutex);
    68 
    68 
    69 /* Unlock the mutex  (Returns 0, or -1 on error) */
    69 /* Unlock the mutex  (Returns 0, or -1 on error)
       
    70    It is an error to unlock a mutex that has not been locked by
       
    71    the current thread, and doing so results in undefined behavior.
       
    72  */
    70 #define SDL_UnlockMutex(m)	SDL_mutexV(m)
    73 #define SDL_UnlockMutex(m)	SDL_mutexV(m)
    71 extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex *mutex);
    74 extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex *mutex);
    72 
    75 
    73 /* Destroy a mutex */
    76 /* Destroy a mutex */
    74 extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex *mutex);
    77 extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex *mutex);