test for pthread_mutex_timedlock() availability in configure

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-13 22:37:26 +00:00
parent 8c58338193
commit e55a667c1c
5 changed files with 116 additions and 409 deletions

View File

@@ -255,6 +255,7 @@ wxMutexError wxMutexInternal::Lock()
wxMutexError wxMutexInternal::Lock(unsigned long ms)
{
#ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK
static const long MSEC_IN_SEC = 1000;
static const long NSEC_IN_MSEC = 1000000;
static const long NSEC_IN_USEC = 1000;
@@ -295,6 +296,11 @@ wxMutexError wxMutexInternal::Lock(unsigned long ms)
}
return HandleLockResult(pthread_mutex_timedlock(&m_mutex, &ts));
#else // !HAVE_PTHREAD_MUTEX_TIMEDLOCK
wxUnusedVar(ms);
return wxMUTEX_MISC_ERROR;
#endif // HAVE_PTHREAD_MUTEX_TIMEDLOCK/!HAVE_PTHREAD_MUTEX_TIMEDLOCK
}
wxMutexError wxMutexInternal::HandleLockResult(int err)