Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/core/StarThread_unix.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/core/StarThread_unix.cpp b/source/core/StarThread_unix.cpp
index a87ee29..7385ae2 100644
--- a/source/core/StarThread_unix.cpp
+++ b/source/core/StarThread_unix.cpp
@@ -22,6 +22,10 @@
#define MAX_THREAD_NAMELEN 16
#endif
+//#ifndef STAR_SYSTEM_MACOS
+//#define STAR_MUTEX_TIMED
+//#endif
+
namespace Star {
struct ThreadImpl {
@@ -131,7 +135,7 @@ struct MutexImpl {
}
void lock() {
-#ifndef STAR_SYSTEM_MACOS
+#ifdef STAR_MUTEX_TIMED
timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
ts.tv_sec += 60;
@@ -210,7 +214,7 @@ struct RecursiveMutexImpl {
}
void lock() {
-#ifndef STAR_SYSTEM_MACOS
+#ifdef STAR_MUTEX_TIMED
timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
ts.tv_sec += 60;