From 0131550432f7b3f8e4e59efaf397be70f736f893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 17 Dec 2021 18:51:16 +0100 Subject: [PATCH] Revert "Use recursive mutexes in the C++ thread implementation" This reverts commit 153ac6df9a7731fcbe5ba1389e8380f64d58f921. --- src/cpp11_thread.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; }