21 #include "../../SDL_internal.h" 29 #include <system_error> 44 }
catch (std::system_error & ex) {
45 SDL_SetError(
"unable to create a C++ mutex: code=%d; %s", ex.code(), ex.what());
47 }
catch (std::bad_alloc &) {
76 }
catch (std::system_error & ex) {
77 SDL_SetError(
"unable to lock a C++ mutex: code=%d; %s", ex.code(), ex.what());
91 if (mutex->
cpp_mutex.try_lock() ==
false) {
void SDL_DestroyMutex(SDL_mutex *mutex)
std::recursive_mutex cpp_mutex
int SDL_mutexP(SDL_mutex *mutex)
SDL_mutex * SDL_CreateMutex(void)
#define SDL_MUTEX_TIMEDOUT
#define SDL_OutOfMemory()
int SDL_TryLockMutex(SDL_mutex *mutex)
int SDL_mutexV(SDL_mutex *mutex)