svn_mutex.h (302408) | svn_mutex.h (362181) |
---|---|
1/** 2 * @copyright 3 * ==================================================================== 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the --- 13 unchanged lines hidden (view full) --- 22 * 23 * @file svn_mutex.h 24 * @brief Structures and functions for mutual exclusion 25 */ 26 27#ifndef SVN_MUTEX_H 28#define SVN_MUTEX_H 29 | 1/** 2 * @copyright 3 * ==================================================================== 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the --- 13 unchanged lines hidden (view full) --- 22 * 23 * @file svn_mutex.h 24 * @brief Structures and functions for mutual exclusion 25 */ 26 27#ifndef SVN_MUTEX_H 28#define SVN_MUTEX_H 29 |
30#include <apr_thread_mutex.h> 31 | |
32#include "svn_error.h" 33 34#ifdef __cplusplus 35extern "C" { 36#endif /* __cplusplus */ 37 38/** 39 * This is a simple wrapper around @c apr_thread_mutex_t and will be a --- 61 unchanged lines hidden (view full) --- 101 */ 102#define SVN_MUTEX__WITH_LOCK(mutex, expr) \ 103do { \ 104 svn_mutex__t *svn_mutex__m = (mutex); \ 105 SVN_ERR(svn_mutex__lock(svn_mutex__m)); \ 106 SVN_ERR(svn_mutex__unlock(svn_mutex__m, (expr))); \ 107} while (0) 108 | 30#include "svn_error.h" 31 32#ifdef __cplusplus 33extern "C" { 34#endif /* __cplusplus */ 35 36/** 37 * This is a simple wrapper around @c apr_thread_mutex_t and will be a --- 61 unchanged lines hidden (view full) --- 99 */ 100#define SVN_MUTEX__WITH_LOCK(mutex, expr) \ 101do { \ 102 svn_mutex__t *svn_mutex__m = (mutex); \ 103 SVN_ERR(svn_mutex__lock(svn_mutex__m)); \ 104 SVN_ERR(svn_mutex__unlock(svn_mutex__m, (expr))); \ 105} while (0) 106 |
107#if APR_HAS_THREADS 108 109/** Return the APR mutex encapsulated in @a mutex. 110 * 111 * @note This function should only be called by APR wrapper code. 112 */ 113apr_thread_mutex_t * 114svn_mutex__get(svn_mutex__t *mutex); 115 116#endif 117 |
|
109#ifdef __cplusplus 110} 111#endif /* __cplusplus */ 112 113#endif /* SVN_MUTEX_H */ | 118#ifdef __cplusplus 119} 120#endif /* __cplusplus */ 121 122#endif /* SVN_MUTEX_H */ |