summaryrefslogtreecommitdiff
path: root/subversion/include/private/svn_mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/include/private/svn_mutex.h')
-rw-r--r--subversion/include/private/svn_mutex.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/subversion/include/private/svn_mutex.h b/subversion/include/private/svn_mutex.h
index c647697..c04820b 100644
--- a/subversion/include/private/svn_mutex.h
+++ b/subversion/include/private/svn_mutex.h
@@ -39,27 +39,23 @@ extern "C" {
* This is a simple wrapper around @c apr_thread_mutex_t and will be a
* valid identifier even if APR does not support threading.
*/
-#if APR_HAS_THREADS
/** A mutex for synchronization between threads. It may be NULL, in
* which case no synchronization will take place. The latter is useful
* when implementing some functionality with optional synchronization.
*/
-typedef apr_thread_mutex_t svn_mutex__t;
-
-#else
-
-/** Dummy definition. The content will never be actually accessed.
- */
-typedef void svn_mutex__t;
-
-#endif
+typedef struct svn_mutex__t svn_mutex__t;
/** Initialize the @a *mutex. If @a mutex_required is TRUE, the mutex will
* actually be created with a lifetime defined by @a result_pool. Otherwise,
* the pointer will be set to @c NULL and svn_mutex__lock() as well as
* svn_mutex__unlock() will be no-ops.
*
+ * 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 threading is not supported by APR, this function is a no-op.
*/
svn_error_t *