mirror of
https://github.com/yawut/SDL.git
synced 2026-09-08 09:06:29 -05:00
Add SDL_TryLockMutex and implementations for all platforms
This commit is contained in:
@@ -73,6 +73,13 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
|
||||
#define SDL_LockMutex(m) SDL_mutexP(m)
|
||||
extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex * mutex);
|
||||
|
||||
/**
|
||||
* Try to lock the mutex
|
||||
*
|
||||
* \return 0, SDL_MUTEX_TIMEDOUT, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
|
||||
|
||||
/**
|
||||
* Unlock the mutex.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user