subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1568953 - /subversion/trunk/subversion/libsvn_fs_fs/fs.c
Date Mon, 17 Feb 2014 12:14:22 GMT
Author: rhuijben
Date: Mon Feb 17 12:14:22 2014
New Revision: 1568953

URL: http://svn.apache.org/r1568953
Log:
Ensure that access to the fsfs transaction list and free transaction
pointer is properly synchronized on Windows.  Before this changeset,
the corresponding txn-list-lock mutex was being enabled/disabled under
the same condition as the mutexes required for the POSIX fcntl file
locking.  This effectively ended up in no synchronization for the
txn-list operations on Windows.

* subversion/libsvn_fs_fs/fs.c
  (fs_serialized_init): Unconditionally enable the TXN_LIST_LOCK mutex
    when using a threaded APR.

Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>
          (tweaked by me)

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/fs.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.c?rev=1568953&r1=1568952&r2=1568953&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.c Mon Feb 17 12:14:22 2014
@@ -103,8 +103,11 @@ fs_serialized_init(svn_fs_t *fs, apr_poo
       SVN_ERR(svn_mutex__init(&ffsd->txn_current_lock,
                               SVN_FS_FS__USE_LOCK_MUTEX, common_pool));
 
+      /* We also need a mutex for synchronizing access to the active
+         transaction list and free transaction pointer.  This one is
+         enabled unconditionally. */
       SVN_ERR(svn_mutex__init(&ffsd->txn_list_lock,
-                              SVN_FS_FS__USE_LOCK_MUTEX, common_pool));
+                              APR_HAS_THREADS, common_pool));
 
       key = apr_pstrdup(common_pool, key);
       status = apr_pool_userdata_set(ffsd, key, NULL, common_pool);



Mime
View raw message