You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ji...@apache.org on 2017/04/05 17:10:31 UTC

svn commit: r1790303 - /apr/apr/trunk/locks/unix/proc_mutex.c

Author: jim
Date: Wed Apr  5 17:10:31 2017
New Revision: 1790303

URL: http://svn.apache.org/viewvc?rev=1790303&view=rev
Log:
Use our "portable" versions

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=1790303&r1=1790302&r2=1790303&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/proc_mutex.c (original)
+++ apr/apr/trunk/locks/unix/proc_mutex.c Wed Apr  5 17:10:31 2017
@@ -181,7 +181,9 @@ static apr_status_t proc_mutex_posix_tim
                                                   apr_time_t timeout,
                                                   int absolute)
 {
-#if HAVE_SEM_TIMEDWAIT
+#if !HAVE_SEM_TIMEDWAIT
+extern int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout);
+#endif
     if (timeout < 0) {
         return proc_mutex_posix_acquire(mutex);
     }
@@ -207,9 +209,6 @@ static apr_status_t proc_mutex_posix_tim
     }
     mutex->curr_locked = 1;
     return APR_SUCCESS;
-#else
-    return APR_ENOTIMPL;
-#endif
 }
 
 static apr_status_t proc_mutex_posix_release(apr_proc_mutex_t *mutex)
@@ -336,7 +335,10 @@ static apr_status_t proc_mutex_sysv_time
                                                  apr_time_t timeout,
                                                  int absolute)
 {
-#if HAVE_SEMTIMEDOP
+#if !HAVE_SEMTIMEDOP
+extern int semtimedop(int semid, struct sembuf *sops, unsigned nsops,
+                      const struct timespec *abs_timeout);
+#endif
     if (timeout < 0) {
         return proc_mutex_sysv_acquire(mutex);
     }
@@ -364,9 +366,6 @@ static apr_status_t proc_mutex_sysv_time
     }
     mutex->curr_locked = 1;
     return APR_SUCCESS;
-#else
-    return APR_ENOTIMPL;
-#endif
 }
 
 static apr_status_t proc_mutex_sysv_release(apr_proc_mutex_t *mutex)