003 File Manager
Current Path:
/usr/src/contrib/subversion/subversion/include/private
usr
/
src
/
contrib
/
subversion
/
subversion
/
include
/
private
/
📁
..
📄
README
(241 B)
📄
ra_svn_sasl.h
(2.63 KB)
📄
ra_svn_wrapped_sasl.h
(3.89 KB)
📄
svn_adler32.h
(1.47 KB)
📄
svn_atomic.h
(4.83 KB)
📄
svn_auth_private.h
(11.32 KB)
📄
svn_branch.h
(22.98 KB)
📄
svn_branch_compat.h
(10.78 KB)
📄
svn_branch_impl.h
(5.67 KB)
📄
svn_branch_nested.h
(7.55 KB)
📄
svn_branch_repos.h
(3.47 KB)
📄
svn_cache.h
(22.67 KB)
📄
svn_cert.h
(2.27 KB)
📄
svn_client_mtcc.h
(7.8 KB)
📄
svn_client_private.h
(22.85 KB)
📄
svn_client_shelf.h
(16.26 KB)
📄
svn_client_shelf2.h
(15.27 KB)
📄
svn_cmdline_private.h
(10.52 KB)
📄
svn_config_private.h
(4.26 KB)
📄
svn_dav_protocol.h
(2.56 KB)
📄
svn_debug.h
(3.35 KB)
📄
svn_delta_private.h
(4.91 KB)
📄
svn_dep_compat.h
(6.64 KB)
📄
svn_diff_private.h
(6 KB)
📄
svn_diff_tree.h
(14.32 KB)
📄
svn_dirent_uri_private.h
(1.85 KB)
📄
svn_doxygen.h
(1.27 KB)
📄
svn_editor.h
(43.09 KB)
📄
svn_element.h
(12.83 KB)
📄
svn_eol_private.h
(3.18 KB)
📄
svn_error_private.h
(1.67 KB)
📄
svn_fs_fs_private.h
(11.08 KB)
📄
svn_fs_private.h
(8.36 KB)
📄
svn_fs_util.h
(11.11 KB)
📄
svn_fspath.h
(5.36 KB)
📄
svn_io_private.h
(6.47 KB)
📄
svn_log.h
(6.96 KB)
📄
svn_magic.h
(2.36 KB)
📄
svn_mergeinfo_private.h
(12.71 KB)
📄
svn_mutex.h
(4.3 KB)
📄
svn_object_pool.h
(4.53 KB)
📄
svn_opt_private.h
(5.73 KB)
📄
svn_packed_data.h
(9.39 KB)
📄
svn_ra_private.h
(12.07 KB)
📄
svn_ra_svn_private.h
(38.63 KB)
📄
svn_repos_private.h
(15.45 KB)
📄
svn_skel.h
(8.46 KB)
📄
svn_sorts_private.h
(7.66 KB)
📄
svn_sqlite.h
(23.22 KB)
📄
svn_string_private.h
(11.05 KB)
📄
svn_subr_private.h
(24.43 KB)
📄
svn_temp_serializer.h
(8.75 KB)
📄
svn_token.h
(3.11 KB)
📄
svn_utf_private.h
(11.18 KB)
📄
svn_wc_private.h
(93.26 KB)
Editing: svn_mutex.h
/** * @copyright * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== * @endcopyright * * @file svn_mutex.h * @brief Structures and functions for mutual exclusion */ #ifndef SVN_MUTEX_H #define SVN_MUTEX_H #include "svn_error.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * This is a simple wrapper around @c apr_thread_mutex_t and will be a * valid identifier even if APR does not support threading. */ /** 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 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 * svn_mutex__init(svn_mutex__t **mutex, svn_boolean_t mutex_required, apr_pool_t *result_pool); /** Acquire the @a mutex, if that has been enabled in svn_mutex__init(). * Make sure to call svn_mutex__unlock() some time later in the same * thread to release the mutex again. Recursive locking are not supported. * * @note You should use #SVN_MUTEX__WITH_LOCK instead of explicit lock * acquisition and release. */ svn_error_t * svn_mutex__lock(svn_mutex__t *mutex); /** Release the @a mutex, previously acquired using svn_mutex__lock() * that has been enabled in svn_mutex__init(). * * Since this is often used as part of the calling function's exit * sequence, we accept that function's current return code in @a err. * If it is not #SVN_NO_ERROR, it will be used as the return value - * irrespective of the possible internal failures during unlock. If @a err * is #SVN_NO_ERROR, internal failures of this function will be * reported in the return value. * * @note You should use #SVN_MUTEX__WITH_LOCK instead of explicit lock * acquisition and release. */ svn_error_t * svn_mutex__unlock(svn_mutex__t *mutex, svn_error_t *err); /** Acquires the @a mutex, executes the expression @a expr and finally * releases the @a mutex. If any of these steps fail, the function using * this macro will return an #svn_error_t. This macro guarantees that * the @a mutex will always be unlocked again if it got locked successfully * by the first step. * * @note Prefer using this macro instead of explicit lock acquisition and * release. */ #define SVN_MUTEX__WITH_LOCK(mutex, expr) \ do { \ svn_mutex__t *svn_mutex__m = (mutex); \ SVN_ERR(svn_mutex__lock(svn_mutex__m)); \ SVN_ERR(svn_mutex__unlock(svn_mutex__m, (expr))); \ } while (0) #if APR_HAS_THREADS /** Return the APR mutex encapsulated in @a mutex. * * @note This function should only be called by APR wrapper code. */ apr_thread_mutex_t * svn_mutex__get(svn_mutex__t *mutex); #endif #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* SVN_MUTEX_H */
Upload File
Create Folder