OS X has pthread_cond_timedwait but not pthread_mutex_timedlock.

This commit is contained in:
Steve Checkoway
2004-09-08 08:36:43 +00:00
parent 03e703e447
commit bf3ce581af
@@ -104,7 +104,6 @@ MutexImpl_Pthreads::~MutexImpl_Pthreads()
} }
#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK)
static bool UseTimedlock() static bool UseTimedlock()
{ {
#if defined(LINUX) #if defined(LINUX)
@@ -115,7 +114,6 @@ static bool UseTimedlock()
return true; return true;
} }
#endif
bool MutexImpl_Pthreads::Lock() bool MutexImpl_Pthreads::Lock()
{ {
@@ -278,7 +276,6 @@ void SemaImpl_Pthreads::Post()
bool SemaImpl_Pthreads::Wait() bool SemaImpl_Pthreads::Wait()
{ {
#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK)
if( UseTimedlock() ) if( UseTimedlock() )
{ {
timeval tv; timeval tv;
@@ -330,7 +327,6 @@ bool SemaImpl_Pthreads::Wait()
pthread_mutex_unlock( &m_Mutex ); pthread_mutex_unlock( &m_Mutex );
return false; return false;
} }
#endif
pthread_mutex_lock( &m_Mutex ); pthread_mutex_lock( &m_Mutex );
while( !m_iValue ) while( !m_iValue )