Add SDL_TryLockMutex and implementations for all platforms

This commit is contained in:
Edward Rudd 2013-03-05 18:54:55 -05:00
parent 191718be44
commit ac51aff110
5 changed files with 140 additions and 2 deletions

View file

@ -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.
*