From 40299558dd4585adb6066cdade5703be7cf10b76 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 15 Sep 2024 16:41:41 +1000 Subject: [PATCH] Update StarThread_unix.cpp --- source/core/StarThread_unix.cpp | 8 ++++++-- 1 file 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;