summaryrefslogtreecommitdiff
path: root/locks
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2016-12-19 00:45:38 +0000
committerYann Ylavic <ylavic@apache.org>2016-12-19 00:45:38 +0000
commit0247612a6c10fb8d74ee23e6166a4c92323f8a92 (patch)
tree20d98706ed1fa14d256173e0f3d130574f3269bd /locks
parentfbdeeadb86e93be204ee1c9ed09946ed85a947a2 (diff)
downloadapr-0247612a6c10fb8d74ee23e6166a4c92323f8a92.tar.gz
locks: follow up to r1667900.
As noticed by rjung, not all pthread implementations have mutex_timedlock(), like Solaris 8, so proc_mutex_proc_pthread_timedacquire() can return APR_ENOTIMPL. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1774973 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r--locks/unix/proc_mutex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/locks/unix/proc_mutex.c b/locks/unix/proc_mutex.c
index e29978a07..c9e4b20f9 100644
--- a/locks/unix/proc_mutex.c
+++ b/locks/unix/proc_mutex.c
@@ -649,6 +649,7 @@ proc_mutex_proc_pthread_timedacquire(apr_proc_mutex_t *mutex,
apr_time_t timeout,
int absolute)
{
+#ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK
if (timeout < 0) {
return proc_mutex_proc_pthread_acquire(mutex);
}
@@ -683,6 +684,9 @@ proc_mutex_proc_pthread_timedacquire(apr_proc_mutex_t *mutex,
}
mutex->curr_locked = 1;
return APR_SUCCESS;
+#else
+ return APR_ENOTIMPL;
+#endif
}
static apr_status_t proc_mutex_proc_pthread_release(apr_proc_mutex_t *mutex)