From 3e7f55ae3010c00de98b46cfbc5f65206707e4de Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 8 Sep 2004 08:56:19 +0000 Subject: [PATCH] no, don't use pthreads extensions if we don't at least have timedlock (not going to bother making it two tests unless it's actually needed) --- stepmania/src/arch/Threads/Threads_Pthreads.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.cpp b/stepmania/src/arch/Threads/Threads_Pthreads.cpp index 6a881bbdeb..545787578e 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.cpp +++ b/stepmania/src/arch/Threads/Threads_Pthreads.cpp @@ -104,6 +104,7 @@ MutexImpl_Pthreads::~MutexImpl_Pthreads() } +#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK) || defined(DARWIN) static bool UseTimedlock() { #if defined(LINUX) @@ -114,6 +115,7 @@ static bool UseTimedlock() return true; } +#endif bool MutexImpl_Pthreads::Lock() { @@ -276,6 +278,7 @@ void SemaImpl_Pthreads::Post() bool SemaImpl_Pthreads::Wait() { +#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK) || defined(DARWIN) if( UseTimedlock() ) { timeval tv; @@ -327,6 +330,7 @@ bool SemaImpl_Pthreads::Wait() pthread_mutex_unlock( &m_Mutex ); return false; } +#endif pthread_mutex_lock( &m_Mutex ); while( !m_iValue )