diff --git a/src/cpp11_thread.cpp b/src/cpp11_thread.cpp index 1f5dd4d2b..071c013a1 100644 --- a/src/cpp11_thread.cpp +++ b/src/cpp11_thread.cpp @@ -42,7 +42,7 @@ thread_wait(thread_t *arg, int timeout) mutex_t * thread_create_mutex(void) { - auto mutex = new std::recursive_mutex; + auto mutex = new std::mutex; return mutex; } @@ -51,7 +51,7 @@ thread_wait_mutex(mutex_t *_mutex) { if (_mutex == nullptr) return(0); - auto mutex = reinterpret_cast(_mutex); + auto mutex = reinterpret_cast(_mutex); mutex->lock(); return 1; } @@ -62,7 +62,7 @@ thread_release_mutex(mutex_t *_mutex) { if (_mutex == nullptr) return(0); - auto mutex = reinterpret_cast(_mutex); + auto mutex = reinterpret_cast(_mutex); mutex->unlock(); return 1; } @@ -71,7 +71,7 @@ thread_release_mutex(mutex_t *_mutex) void thread_close_mutex(mutex_t *_mutex) { - auto mutex = reinterpret_cast(_mutex); + auto mutex = reinterpret_cast(_mutex); delete mutex; }