You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2017/05/23 16:36:02 UTC

svn commit: r1795934 - in /apr/apr/branches/1.6.x: CHANGES configure.in include/apr.h.in locks/unix/global_mutex.c locks/unix/proc_mutex.c locks/unix/thread_mutex.c test/testlock.c test/testprocmutex.c

Author: wrowe
Date: Tue May 23 16:36:02 2017
New Revision: 1795934

URL: http://svn.apache.org/viewvc?rev=1795934&view=rev
Log:
Revert r1791932

Was:

Make timedlocks a configuration option.
After first Mac then Solaris biting us, timedlocks look high-risk,
so a config option and a corresponding rlease note offer a workaround
to any users who get bitten.


Modified:
    apr/apr/branches/1.6.x/CHANGES
    apr/apr/branches/1.6.x/configure.in
    apr/apr/branches/1.6.x/include/apr.h.in
    apr/apr/branches/1.6.x/locks/unix/global_mutex.c
    apr/apr/branches/1.6.x/locks/unix/proc_mutex.c
    apr/apr/branches/1.6.x/locks/unix/thread_mutex.c
    apr/apr/branches/1.6.x/test/testlock.c
    apr/apr/branches/1.6.x/test/testprocmutex.c

Modified: apr/apr/branches/1.6.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/CHANGES?rev=1795934&r1=1795933&r2=1795934&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.6.x/CHANGES [utf-8] Tue May 23 16:36:02 2017
@@ -1,8 +1,6 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 1.6.1
 
-  *) Locks: add a --disable-timedlocks config option in case users
-     encounter more platforms where it fails [Nick Kew].
 
 Changes for APR 1.6.0
 

Modified: apr/apr/branches/1.6.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/configure.in?rev=1795934&r1=1795933&r2=1795934&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/configure.in (original)
+++ apr/apr/branches/1.6.x/configure.in Tue May 23 16:36:02 2017
@@ -2789,12 +2789,6 @@ AC_MSG_RESULT($ipv6_result)
 
 AC_SUBST(have_ipv6)
 
-AC_ARG_ENABLE(timedlocks,
-  [  --disable-timedlocks	  Disable timed locks ],
-  [apr_has_timedlocks="0"], [apr_has_timedlocks="1"]
-)
-AC_SUBST(apr_has_timedlocks)
-
 # hstrerror is only needed if IPv6 is not enabled,
 # so getaddrinfo/gai_strerror are not used.
 if test $have_ipv6 = 0; then

Modified: apr/apr/branches/1.6.x/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/include/apr.h.in?rev=1795934&r1=1795933&r2=1795934&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/include/apr.h.in (original)
+++ apr/apr/branches/1.6.x/include/apr.h.in Tue May 23 16:36:02 2017
@@ -280,7 +280,6 @@ extern "C" {
 #define APR_HAS_LARGE_FILES       @aprlfs@
 #define APR_HAS_XTHREAD_FILES     @apr_has_xthread_files@
 #define APR_HAS_OS_UUID           @osuuid@
-#define APR_HAS_TIMEDLOCKS        @apr_has_timedlocks@
 
 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
 

Modified: apr/apr/branches/1.6.x/locks/unix/global_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/unix/global_mutex.c?rev=1795934&r1=1795933&r2=1795934&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/locks/unix/global_mutex.c (original)
+++ apr/apr/branches/1.6.x/locks/unix/global_mutex.c Tue May 23 16:36:02 2017
@@ -145,7 +145,6 @@ APR_DECLARE(apr_status_t) apr_global_mut
 APR_DECLARE(apr_status_t) apr_global_mutex_timedlock(apr_global_mutex_t *mutex,
                                                  apr_interval_time_t timeout)
 {
-#if APR_HAS_TIMEDLOCKS
     apr_status_t rv;
 
 #if APR_HAS_THREADS
@@ -178,9 +177,6 @@ APR_DECLARE(apr_status_t) apr_global_mut
 #endif /* APR_HAS_THREADS */
 
     return rv;
-#else  /* APR_HAS_TIMEDLOCKS */
-    return APR_ENOTIMPL;
-#endif
 }
 
 APR_DECLARE(apr_status_t) apr_global_mutex_unlock(apr_global_mutex_t *mutex)

Modified: apr/apr/branches/1.6.x/locks/unix/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/unix/proc_mutex.c?rev=1795934&r1=1795933&r2=1795934&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/locks/unix/proc_mutex.c (original)
+++ apr/apr/branches/1.6.x/locks/unix/proc_mutex.c Tue May 23 16:36:02 2017
@@ -1560,11 +1560,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex
 APR_DECLARE(apr_status_t) apr_proc_mutex_timedlock(apr_proc_mutex_t *mutex,
                                                apr_interval_time_t timeout)
 {
-#if APR_HAS_TIMEDLOCKS
     return mutex->meth->timedacquire(mutex, timeout);
-#else
-    return APR_ENOTIMPL;
-#endif
 }
 
 APR_DECLARE(apr_status_t) apr_proc_mutex_unlock(apr_proc_mutex_t *mutex)

Modified: apr/apr/branches/1.6.x/locks/unix/thread_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/unix/thread_mutex.c?rev=1795934&r1=1795933&r2=1795934&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/locks/unix/thread_mutex.c (original)
+++ apr/apr/branches/1.6.x/locks/unix/thread_mutex.c Tue May 23 16:36:02 2017
@@ -193,7 +193,6 @@ APR_DECLARE(apr_status_t) apr_thread_mut
                                                  apr_interval_time_t timeout)
 {
     apr_status_t rv = APR_ENOTIMPL;
-#if APR_HAS_TIMEDLOCKS
 
 #ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK
     if (timeout <= 0) {
@@ -270,7 +269,6 @@ APR_DECLARE(apr_status_t) apr_thread_mut
 
 #endif /* HAVE_PTHREAD_MUTEX_TIMEDLOCK */
 
-#endif /* APR_HAS_TIMEDLOCKS */
     return rv;
 }
 

Modified: apr/apr/branches/1.6.x/test/testlock.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/test/testlock.c?rev=1795934&r1=1795933&r2=1795934&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/test/testlock.c (original)
+++ apr/apr/branches/1.6.x/test/testlock.c Tue May 23 16:36:02 2017
@@ -396,16 +396,12 @@ abts_suite *testlock(abts_suite *suite)
     abts_run_test(suite, threads_not_impl, NULL);
 #else
     abts_run_test(suite, test_thread_mutex, NULL);
-#if APR_HAS_TIMEDLOCKS
     abts_run_test(suite, test_thread_timedmutex, NULL);
-#endif
     abts_run_test(suite, test_thread_rwlock, NULL);
     abts_run_test(suite, test_cond, NULL);
     abts_run_test(suite, test_timeoutcond, NULL);
-#if APR_HAS_TIMEDLOCKS
     abts_run_test(suite, test_timeoutmutex, NULL);
 #endif
-#endif
 
     return suite;
 }

Modified: apr/apr/branches/1.6.x/test/testprocmutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/test/testprocmutex.c?rev=1795934&r1=1795933&r2=1795934&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/test/testprocmutex.c (original)
+++ apr/apr/branches/1.6.x/test/testprocmutex.c Tue May 23 16:36:02 2017
@@ -184,7 +184,6 @@ static void test_exclusive(abts_case *tc
                     *x == MAX_COUNTER);
     }
 
-#if APR_HAS_TIMEDLOCKS
     rv = apr_proc_mutex_timedlock(proc_lock, 1);
     if (rv == APR_ENOTIMPL) {
         fprintf(stderr, "%s_timedlock() not implemented, ", mech->name);
@@ -221,7 +220,6 @@ static void test_exclusive(abts_case *tc
         ABTS_ASSERT(tc, "Locks don't appear to work with timedlock",
                     *x == MAX_COUNTER);
     }
-#endif  /* APR_HAS_TIMEDLOCKS */
 }
 
 static void proc_mutex(abts_case *tc, void *data)