apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1774973 - /apr/apr/trunk/locks/unix/proc_mutex.c
Date Mon, 19 Dec 2016 00:45:39 GMT
Author: ylavic
Date: Mon Dec 19 00:45:38 2016
New Revision: 1774973

URL: http://svn.apache.org/viewvc?rev=1774973&view=rev
Log:
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.


Modified:
    apr/apr/trunk/locks/unix/proc_mutex.c

Modified: apr/apr/trunk/locks/unix/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/proc_mutex.c?rev=1774973&r1=1774972&r2=1774973&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/proc_mutex.c (original)
+++ apr/apr/trunk/locks/unix/proc_mutex.c Mon Dec 19 00:45:38 2016
@@ -649,6 +649,7 @@ proc_mutex_proc_pthread_timedacquire(apr
                                      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
     }
     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)



Mime
View raw message