Author: stefan2
Date: Wed Aug 20 10:30:26 2014
New Revision: 1619068

URL: http://svn.apache.org/r1619068
Log:
Remove the "checked" option from svn_mutex_t.  Update all callers
and remove the regression test.

The reason is that there seems to be no portable way (e.g. via a
series of conversions) to use APR atomic CAS operations with
apr_os_thread_t.

* subversion/include/private/svn_mutex.h
  (svn_mutex__init): Remove CHECKED option.

* subversion/include/svn_error_codes.h
  (SVN_ERR_RECURSIVE_LOCK): Remove as it has no users anymore.
  (SVN_ERR_INVALID_INPUT): Update number.

* subversion/libsvn_subr/mutex.c
  (svn_mutex__t): Remove all aux. members that were used for mutex
                  checking only.  Make sure we don't end up with an
                  empty struct on systems that don't support threads.
  (svn_mutex__init,
   svn_mutex__lock, 
   svn_mutex__unlock): Remove all mutex the checking code.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
  (never_reached,
   lock_again,
   recursive_locking): Remove test case for "checked" mutexes.
  (test_funcs): Remove test from list.

* subversion/libsvn_fs_base/bdb/env.c
  (bdb_init_cb): Update mutex init call.

* subversion/libsvn_fs_fs/fs.c
  (fs_serialized_init): Same.

* subversion/libsvn_fs/fs-loader.c
  (synchronized_initialize): Same.

* subversion/libsvn_fs_x/fs.c
  (x_serialized_init): Same.

* subversion/libsvn_ra_svn/cyrus_auth.c
  (sasl_mutex_alloc_cb_internal,
   svn_ra_svn__sasl_common_init): Same.

* subversion/libsvn_subr/cache-inprocess.c
  (svn_cache__create_inprocess): Same.

* subversion/libsvn_subr/cache-membuffer.c
  (svn_cache__membuffer_cache_create,
   svn_cache__create_membuffer_cache): Same. 

* subversion/libsvn_subr/dso.c
  (svn_dso_initialize2): Same.

* subversion/libsvn_subr/named_atomic.c
  (init_thread_mutex): Same.

* subversion/libsvn_subr/object_pool.c
  (svn_object_pool__create): Same.

* subversion/libsvn_subr/root_pools.c
  (svn_root_pools__create): Same.

* subversion/libsvn_subr/utf.c
  (svn_utf_initialize2): Same.

* subversion/svnserve/logger.c
  (logger__create_for_stderr, 
   logger__create): Same.

* subversion/tests/svn_test_main.c
  (svn_test_main): Same.

Modified:
    subversion/trunk/subversion/include/private/svn_mutex.h
    subversion/trunk/subversion/include/svn_error_codes.h
    subversion/trunk/subversion/libsvn_fs/fs-loader.c
    subversion/trunk/subversion/libsvn_fs_base/bdb/env.c
    subversion/trunk/subversion/libsvn_fs_fs/fs.c
    subversion/trunk/subversion/libsvn_fs_x/fs.c
    subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c
    subversion/trunk/subversion/libsvn_subr/cache-inprocess.c
    subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
    subversion/trunk/subversion/libsvn_subr/dso.c
    subversion/trunk/subversion/libsvn_subr/mutex.c
    subversion/trunk/subversion/libsvn_subr/named_atomic.c
    subversion/trunk/subversion/libsvn_subr/object_pool.c
    subversion/trunk/subversion/libsvn_subr/root_pools.c
    subversion/trunk/subversion/libsvn_subr/utf.c
    subversion/trunk/subversion/svnserve/logger.c
    subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
    subversion/trunk/subversion/tests/svn_test_main.c

Modified: subversion/trunk/subversion/include/private/svn_mutex.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_mutex.h?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_mutex.h (original)
+++ subversion/trunk/subversion/include/private/svn_mutex.h Wed Aug 20 10:30:26 
2014
@@ -54,16 +54,13 @@ typedef struct svn_mutex__t svn_mutex__t
  * We don't support recursive locks, i.e. a thread may not acquire the same
  * mutex twice without releasing it in between.  Attempts to lock a mutex
  * recursively will cause lock ups and other undefined behavior on some
- * systems.  If @a checked is set, svn_mutex__lock() will try to detect that
- * situation and return an error.  However, this comes with some system
- * dependent overhead and may not detect all violations.
+ * systems.
  *
  * If threading is not supported by APR, this function is a no-op.
  */
 svn_error_t *
 svn_mutex__init(svn_mutex__t **mutex,
                 svn_boolean_t mutex_required,
-                svn_boolean_t checked,
                 apr_pool_t *result_pool);
 
 /** Acquire the @a mutex, if that has been enabled in svn_mutex__init().

Modified: subversion/trunk/subversion/include/svn_error_codes.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_error_codes.h?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_error_codes.h (original)
+++ subversion/trunk/subversion/include/svn_error_codes.h Wed Aug 20 10:30:26 
2014
@@ -1426,13 +1426,8 @@ SVN_ERROR_START
              "Additional errors:")
 
   /** @since New in 1.9. */
-  SVN_ERRDEF(SVN_ERR_RECURSIVE_LOCK,
-             SVN_ERR_MISC_CATEGORY_START + 43,
-             "Recursive locks are not supported")
-
-  /** @since New in 1.9. */
   SVN_ERRDEF(SVN_ERR_INVALID_INPUT,
-             SVN_ERR_MISC_CATEGORY_START + 44,
+             SVN_ERR_MISC_CATEGORY_START + 43,
              "Parser error: invalid input")
 
   /* command-line client errors */

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Wed Aug 20 10:30:26 2014
@@ -393,7 +393,7 @@ synchronized_initialize(void *baton, apr
 {
   common_pool = svn_pool_create(pool);
   base_defn.next = NULL;
-  SVN_ERR(svn_mutex__init(&common_pool_lock, TRUE, TRUE, common_pool));
+  SVN_ERR(svn_mutex__init(&common_pool_lock, TRUE, common_pool));
 
   /* ### This won't work if POOL is NULL and libsvn_fs is loaded as a DSO
      ### (via libsvn_ra_local say) since the global common_pool will live

Modified: subversion/trunk/subversion/libsvn_fs_base/bdb/env.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/bdb/env.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/bdb/env.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/bdb/env.c Wed Aug 20 10:30:26 
2014
@@ -380,7 +380,7 @@ bdb_init_cb(void *baton, apr_pool_t *poo
   bdb_cache_pool = svn_pool_create(pool);
   bdb_cache = apr_hash_make(bdb_cache_pool);
 
-  SVN_ERR(svn_mutex__init(&bdb_cache_lock, TRUE, TRUE, bdb_cache_pool));
+  SVN_ERR(svn_mutex__init(&bdb_cache_lock, TRUE, bdb_cache_pool));
   apr_pool_cleanup_register(bdb_cache_pool, NULL, clear_cache,
                             apr_pool_cleanup_null);
 

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.c Wed Aug 20 10:30:26 2014
@@ -108,21 +108,17 @@ fs_serialized_init(svn_fs_t *fs, apr_poo
       /* POSIX fcntl locks are per-process, so we need a mutex for
          intra-process synchronization when grabbing the repository write
          lock. */
-      SVN_ERR(svn_mutex__init(&ffsd->fs_write_lock,
-                              TRUE, TRUE, common_pool));
+      SVN_ERR(svn_mutex__init(&ffsd->fs_write_lock, TRUE, common_pool));
 
       /* ... the pack lock ... */
-      SVN_ERR(svn_mutex__init(&ffsd->fs_pack_lock,
-                              TRUE, TRUE, common_pool));
+      SVN_ERR(svn_mutex__init(&ffsd->fs_pack_lock, TRUE, common_pool));
 
       /* ... not to mention locking the txn-current file. */
-      SVN_ERR(svn_mutex__init(&ffsd->txn_current_lock,
-                              TRUE, TRUE, common_pool));
+      SVN_ERR(svn_mutex__init(&ffsd->txn_current_lock, TRUE, common_pool));
 
       /* We also need a mutex for synchronizing access to the active
          transaction list and free transaction pointer. */
-      SVN_ERR(svn_mutex__init(&ffsd->txn_list_lock,
-                              TRUE, TRUE, common_pool));
+      SVN_ERR(svn_mutex__init(&ffsd->txn_list_lock, TRUE, common_pool));
 
       key = apr_pstrdup(common_pool, key);
       status = apr_pool_userdata_set(ffsd, key, NULL, common_pool);

Modified: subversion/trunk/subversion/libsvn_fs_x/fs.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/fs.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/fs.c Wed Aug 20 10:30:26 2014
@@ -99,21 +99,17 @@ x_serialized_init(svn_fs_t *fs, apr_pool
       /* POSIX fcntl locks are per-process, so we need a mutex for
          intra-process synchronization when grabbing the repository write
          lock. */
-      SVN_ERR(svn_mutex__init(&ffsd->fs_write_lock,
-                              TRUE, TRUE, common_pool));
+      SVN_ERR(svn_mutex__init(&ffsd->fs_write_lock, TRUE, common_pool));
 
       /* ... the pack lock ... */
-      SVN_ERR(svn_mutex__init(&ffsd->fs_pack_lock,
-                              TRUE, TRUE, common_pool));
+      SVN_ERR(svn_mutex__init(&ffsd->fs_pack_lock, TRUE, common_pool));
 
       /* ... not to mention locking the txn-current file. */
-      SVN_ERR(svn_mutex__init(&ffsd->txn_current_lock,
-                              TRUE, TRUE, common_pool));
+      SVN_ERR(svn_mutex__init(&ffsd->txn_current_lock, TRUE, common_pool));
 
       /* We also need a mutex for synchronizing access to the active
          transaction list and free transaction pointer. */
-      SVN_ERR(svn_mutex__init(&ffsd->txn_list_lock,
-                              TRUE, TRUE, common_pool));
+      SVN_ERR(svn_mutex__init(&ffsd->txn_list_lock, TRUE, common_pool));
 
       key = apr_pstrdup(common_pool, key);
       status = apr_pool_userdata_set(ffsd, key, NULL, common_pool);

Modified: subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/cyrus_auth.c Wed Aug 20 10:30:26 
2014
@@ -93,7 +93,7 @@ static svn_error_t *
 sasl_mutex_alloc_cb_internal(svn_mutex__t **mutex)
 {
   if (apr_is_empty_array(free_mutexes))
-    return svn_mutex__init(mutex, TRUE, FALSE, sasl_pool);
+    return svn_mutex__init(mutex, TRUE, sasl_pool);
   else
     *mutex = *((svn_mutex__t**)apr_array_pop(free_mutexes));
 
@@ -179,7 +179,7 @@ svn_ra_svn__sasl_common_init(apr_pool_t 
                  sasl_mutex_unlock_cb,
                  sasl_mutex_free_cb);
   free_mutexes = apr_array_make(sasl_pool, 0, sizeof(svn_mutex__t *));
-  SVN_ERR(svn_mutex__init(&array_mutex, TRUE, FALSE, sasl_pool));
+  SVN_ERR(svn_mutex__init(&array_mutex, TRUE, sasl_pool));
 
 #endif /* APR_HAS_THREADS */
 

Modified: subversion/trunk/subversion/libsvn_subr/cache-inprocess.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-inprocess.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-inprocess.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-inprocess.c Wed Aug 20 
10:30:26 2014
@@ -680,7 +680,7 @@ svn_cache__create_inprocess(svn_cache__t
   /* The sentinel doesn't need a pool.  (We're happy to crash if we
    * accidentally try to treat it like a real page.) */
 
-  SVN_ERR(svn_mutex__init(&cache->mutex, thread_safe, FALSE, pool));
+  SVN_ERR(svn_mutex__init(&cache->mutex, thread_safe, pool));
 
   cache->cache_pool = pool;
 

Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Wed Aug 20 
10:30:26 2014
@@ -1840,8 +1840,7 @@ svn_cache__membuffer_cache_create(svn_me
       /* Since a simple mutex already guarantees fully serialized access,
          we need this mutex only when we use multple-reader-1-writer locks. */
       SVN_ERR(svn_mutex__init(&c[seg].counter_mutex,
-                              thread_safe && !USE_SIMPLE_MUTEX, FALSE,
-                              pool));
+                              thread_safe && !USE_SIMPLE_MUTEX, pool));
     }
 
   /* done here
@@ -3132,7 +3131,7 @@ svn_cache__create_membuffer_cache(svn_ca
   cache->priority = priority;
   cache->key_len = klen;
 
-  SVN_ERR(svn_mutex__init(&cache->mutex, thread_safe, FALSE, result_pool));
+  SVN_ERR(svn_mutex__init(&cache->mutex, thread_safe, result_pool));
 
   /* for performance reasons, we don't actually store the full prefix but a
    * hash value of it

Modified: subversion/trunk/subversion/libsvn_subr/dso.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/dso.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/dso.c (original)
+++ subversion/trunk/subversion/libsvn_subr/dso.c Wed Aug 20 10:30:26 2014
@@ -55,7 +55,7 @@ svn_dso_initialize2(void)
 
   dso_pool = svn_pool_create(NULL);
 
-  SVN_ERR(svn_mutex__init(&dso_mutex, TRUE, TRUE, dso_pool));
+  SVN_ERR(svn_mutex__init(&dso_mutex, TRUE, dso_pool));
 
   dso_cache = apr_hash_make(dso_pool);
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_subr/mutex.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mutex.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/mutex.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mutex.c Wed Aug 20 10:30:26 2014
@@ -35,37 +35,21 @@
  */
 struct svn_mutex__t
 {
-  /* If TRUE, perform extra checks to detect attempts at recursive locking. */
-  svn_boolean_t checked;
-
 #if APR_HAS_THREADS
 
   apr_thread_mutex_t *mutex;
 
-  /* The owner of this lock, if locked or NULL, otherwise.  Since NULL might
-   * be a valid owner ID on some systems, checking for NULL may not be 100%
-   * accurate.  Be sure to only produce false negatives in that case.
-   * We can't use apr_os_thread_t directly here as there is no portable way
-   * to access them atomically.  Instead, we assume that it can always be
-   * cast safely to a pointer.
-   * This value will only be modified while the lock is being held.  So,
-   * setting and resetting it is never racy (but reading it may be).
-   * Only used when CHECKED is set. */
-  volatile void *owner;
-
 #else
 
-  /* If there is no multi-threading support, simply count lock attempts. */
-  int count;
+  /* Truly empty structs are not allowed. */
+  int dummy;
 
 #endif
-
 };
 
 svn_error_t *
 svn_mutex__init(svn_mutex__t **mutex_p,
                 svn_boolean_t mutex_required,
-                svn_boolean_t checked,
                 apr_pool_t *result_pool)
 {
   /* always initialize the mutex pointer, even though it is not
@@ -85,7 +69,6 @@ svn_mutex__init(svn_mutex__t **mutex_p,
         return svn_error_wrap_apr(status, _("Can't create mutex"));
 #endif
 
-      mutex->checked = checked;
       *mutex_p = mutex;
     }
 
@@ -98,64 +81,9 @@ svn_mutex__lock(svn_mutex__t *mutex)
   if (mutex)
     {
 #if APR_HAS_THREADS
-      apr_status_t status;
-      void *current_thread;
-      void *lock_owner;
-
-      /* Detect recursive locking attempts. */
-      if (mutex->checked)
-        {
-          /* "us" */
-          current_thread = (void *)apr_os_thread_current();
-
-          /* Get the current owner value without actually modifying it
-             (idempotent replacement of NULL by NULL).  We need the atomic
-             operation here since other threads may be writing to this
-             variable while we read it (in which case LOCK_OWNER and
-             CURRENT_THREAD will differ). */
-          lock_owner = apr_atomic_casptr(&mutex->owner, NULL, NULL);
-
-          /* If this matches, svn_mutex__unlock did not reset the owner
-             since this thread acquired the lock:  Because there is no
-             exit condition between that reset and the actual mutex unlock,
-             and because no other thread would set the owner to this value,
-             this thread has simply not released the mutex. */
-          if (lock_owner &&
-              apr_os_thread_equal((apr_os_thread_t)lock_owner,
-                                  (apr_os_thread_t)current_thread))
-            return svn_error_create(SVN_ERR_RECURSIVE_LOCK, NULL, 
-                                    _("Recursive locks are not supported"));
-        }
-
-      /* Acquire the mutex.  In the meantime, other threads may acquire and
-         release the same lock.  Once we got the lock, however, it is in a
-         defined state. */
-      status = apr_thread_mutex_lock(mutex->mutex);
+      apr_status_t status = apr_thread_mutex_lock(mutex->mutex);
       if (status)
         return svn_error_wrap_apr(status, _("Can't lock mutex"));
-
-      /* We own the lock now. */
-      if (mutex->checked)
-        {
-          /* It must have been released by the previous owner as part of
-             the mutex unlock. */
-          SVN_ERR_ASSERT(apr_atomic_casptr(&mutex->owner, NULL, NULL) == NULL);
-
-          /* Set "us" as the new owner. */
-          apr_atomic_casptr(&mutex->owner, current_thread, NULL);
-        }
-#else
-      if (mutex->checked)
-        {
-          /* We want non-threaded systems to detect the same coding errors
-             as threaded systems.  No further sync required. */
-          if (mutex->count)
-            return svn_error_create(SVN_ERR_RECURSIVE_LOCK, NULL, 
-                                    _("Recursive locks are not supported"));
-
-          /* Update lock counter. */
-          ++mutex->count;
-        }
 #endif
     }
 
@@ -169,49 +97,9 @@ svn_mutex__unlock(svn_mutex__t *mutex,
   if (mutex)
     {
 #if APR_HAS_THREADS
-      apr_status_t status;
-
-      /* We will soon no longer be the owner of this lock.  So, reset the
-         OWNER value.  This makes no difference to the recursion check in
-         *other* threads; they are known not to hold this mutex and will
-         not assume that they do after we set the OWNER to NULL.  And the
-         current thread is known not to attempt a recursive lock right now;
-         it cannot be in two places at the same time. */
-      if (mutex->checked)
-        {
-          /* Reading the current OWNER value is faster and more reliable
-             than asking APR for the current thread id (APR might return
-             different but equivalent IDs for the same thread). */
-          void *lock_owner = apr_atomic_casptr(&mutex->owner, NULL, NULL);
-
-          /* Check for double unlock. */
-          if (lock_owner == NULL)
-            {
-              /* There seems to be no guarantee that NULL is _not_ a valid
-                 thread ID.  Double check to be sure. */
-              if (!apr_os_thread_equal((apr_os_thread_t)lock_owner,
-                                       apr_os_thread_current()))
-                SVN_ERR_MALFUNCTION();
-            }
-
-          /* Now, set it to NULL. */
-          apr_atomic_casptr(&mutex->owner, NULL,  lock_owner);
-        }
-
-      /* Release the actual mutex. */
-      status = apr_thread_mutex_unlock(mutex->mutex);
+      apr_status_t status = apr_thread_mutex_unlock(mutex->mutex);
       if (status && !err)
         return svn_error_wrap_apr(status, _("Can't unlock mutex"));
-#else
-      /* Update lock counter. */
-      if (mutex->checked)
-        {
-          /* Trying to release a non-locked mutex? */
-          if (mutex->count <= 0)
-            SVN_ERR_MALFUNCTION();
-
-          --mutex->count;
-        }
 #endif
     }
 

Modified: subversion/trunk/subversion/libsvn_subr/named_atomic.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/named_atomic.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/named_atomic.c (original)
+++ subversion/trunk/subversion/libsvn_subr/named_atomic.c Wed Aug 20 10:30:26 
2014
@@ -266,7 +266,7 @@ init_thread_mutex(void *baton, apr_pool_
   /* let the mutex live as long as the APR */
   apr_pool_t *global_pool = svn_pool_create(NULL);
 
-  return svn_mutex__init(&thread_mutex, USE_THREAD_MUTEX, TRUE, global_pool);
+  return svn_mutex__init(&thread_mutex, USE_THREAD_MUTEX, global_pool);
 }
 #endif /* APR_HAS_MMAP */
 

Modified: subversion/trunk/subversion/libsvn_subr/object_pool.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/object_pool.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/object_pool.c (original)
+++ subversion/trunk/subversion/libsvn_subr/object_pool.c Wed Aug 20 10:30:26 
2014
@@ -329,7 +329,7 @@ svn_object_pool__create(svn_object_pool_
    * cleanup and to prevent threading issues with the allocator
    */
   result = apr_pcalloc(pool, sizeof(*result));
-  SVN_ERR(svn_mutex__init(&result->mutex, thread_safe, FALSE, pool));
+  SVN_ERR(svn_mutex__init(&result->mutex, thread_safe, pool));
 
   result->pool = pool;
   result->objects = svn_hash__make(result->pool);

Modified: subversion/trunk/subversion/libsvn_subr/root_pools.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/root_pools.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/root_pools.c (original)
+++ subversion/trunk/subversion/libsvn_subr/root_pools.c Wed Aug 20 10:30:26 
2014
@@ -48,7 +48,7 @@ svn_root_pools__create(svn_root_pools__t
 
   /* construct result object */
   svn_root_pools__t *result = apr_pcalloc(pool, sizeof(*result));
-  SVN_ERR(svn_mutex__init(&result->mutex, TRUE, FALSE, pool));
+  SVN_ERR(svn_mutex__init(&result->mutex, TRUE, pool));
   result->unused_pools = apr_array_make(pool, 16, sizeof(apr_pool_t *));
 
   /* done */

Modified: subversion/trunk/subversion/libsvn_subr/utf.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf.c Wed Aug 20 10:30:26 2014
@@ -132,7 +132,7 @@ svn_utf_initialize2(svn_boolean_t assume
          and pool allocation is not thread-safe. */
       apr_pool_t *subpool = svn_pool_create(pool);
       svn_mutex__t *mutex;
-      svn_error_t *err = svn_mutex__init(&mutex, TRUE, FALSE, subpool);
+      svn_error_t *err = svn_mutex__init(&mutex, TRUE, subpool);
       if (err)
         {
           svn_error_clear(err);

Modified: subversion/trunk/subversion/svnserve/logger.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/logger.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/logger.c (original)
+++ subversion/trunk/subversion/svnserve/logger.c Wed Aug 20 10:30:26 2014
@@ -60,7 +60,7 @@ logger__create_for_stderr(logger_t **log
   result->pool = svn_pool_create(pool);
   
   SVN_ERR(svn_stream_for_stderr(&result->stream, pool));
-  SVN_ERR(svn_mutex__init(&result->mutex, TRUE, FALSE, pool));
+  SVN_ERR(svn_mutex__init(&result->mutex, TRUE, pool));
 
   *logger = result;
 
@@ -78,7 +78,7 @@ logger__create(logger_t **logger,
   SVN_ERR(svn_io_file_open(&file, filename,
                            APR_WRITE | APR_CREATE | APR_APPEND,
                            APR_OS_DEFAULT, pool));
-  SVN_ERR(svn_mutex__init(&result->mutex, TRUE, FALSE, pool));
+  SVN_ERR(svn_mutex__init(&result->mutex, TRUE, pool));
 
   result->stream = svn_stream_from_aprfile2(file, FALSE,  pool);
   result->pool = svn_pool_create(pool);

Modified: subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Wed Aug 20 
10:30:26 2014
@@ -1113,46 +1113,6 @@ upgrade_old_txns_to_log_addressing(const
 
 /* ------------------------------------------------------------------------ */
 
-static svn_error_t *
-never_reached(void *baton,
-              apr_pool_t *pool)
-{
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-lock_again(void *baton,
-           apr_pool_t *pool)
-{
-  svn_fs_t *fs = baton;
-  SVN_TEST_ASSERT_ERROR(svn_fs_fs__with_all_locks(fs, never_reached, fs,
-                                                  pool),
-                        SVN_ERR_RECURSIVE_LOCK);
-  return SVN_NO_ERROR;
-}
-
-#define REPO_NAME "recursive_locking"
-static svn_error_t *
-recursive_locking(const svn_test_opts_t *opts,
-                  apr_pool_t *pool)
-{
-  svn_fs_t *fs;
-
-  /* Bail (with success) on known-untestable scenarios */
-  if (strcmp(opts->fs_type, "fsfs") != 0)
-    return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
-                            "this will test FSFS repositories only");
-
-  SVN_ERR(svn_test__create_fs(&fs, REPO_NAME, opts, pool));
-  SVN_ERR(svn_fs_fs__with_all_locks(fs, lock_again, fs, pool));
-
-  return SVN_NO_ERROR;
-}
-
-#undef REPO_NAME
-
-/* ------------------------------------------------------------------------ */
-
 #define REPO_NAME "metadata_checksumming"
 static svn_error_t *
 metadata_checksumming(const svn_test_opts_t *opts,
@@ -1244,8 +1204,6 @@ static struct svn_test_descriptor_t test
                        "upgrade txns to log addressing in shared FSFS"),
     SVN_TEST_OPTS_PASS(upgrade_old_txns_to_log_addressing,
                        "upgrade txns started before svnadmin upgrade"),
-    SVN_TEST_OPTS_PASS(recursive_locking,
-                       "prevent recursive locking"),
     SVN_TEST_OPTS_PASS(metadata_checksumming,
                        "metadata checksums being checked"),
     SVN_TEST_NULL

Modified: subversion/trunk/subversion/tests/svn_test_main.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_main.c?rev=1619068&r1=1619067&r2=1619068&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test_main.c (original)
+++ subversion/trunk/subversion/tests/svn_test_main.c Wed Aug 20 10:30:26 2014
@@ -719,7 +719,7 @@ svn_test_main(int argc, const char *argv
    * usage but make it thread-safe to allow for multi-threaded tests.
    */
   pool = apr_allocator_owner_get(svn_pool_create_allocator(TRUE));
-  err = svn_mutex__init(&log_mutex, TRUE, TRUE, pool);
+  err = svn_mutex__init(&log_mutex, TRUE, pool);
   if (err)
     {
       svn_handle_error2(err, stderr, TRUE, "svn_tests: ");


Reply via email to