diff options
author | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2016-03-06 00:19:51 +0000 |
---|---|---|
committer | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2016-03-06 00:19:51 +0000 |
commit | 48b165c02e395250c3d12a55d07ed0b6c8cdf039 (patch) | |
tree | 976669566fec3c84f71506cbd1797ee26f8ab426 /include/apr_proc_mutex.h | |
parent | 790c11558d32066381aa00a6f903f7bfe82c0d53 (diff) | |
download | libapr-48b165c02e395250c3d12a55d07ed0b6c8cdf039.tar.gz |
apr_proc/global_mutex: Fix API regarding the native OS mutexes
accessors from/to available APR mechanisms, adding the new functions
apr_os_proc_mutex_get_ex() and apr_os_proc_mutex_set_ex() which give
control to the user over the selected mechanisms, including the missing
POSIX semaphores (sem_t) on platforms supporting them.
For POSIX sems, this moves the "sem_t *psem_interproc;" member from struct
apr_proc_mutex_t to apr_os_proc_mutex_t (now complete) so that we can avoid
members duplication between the two structs, and hence replace all the doublons
in apr_os_proc_mutex_t with an apr_os_proc_mutex_t member, called "os", to be
used for runtime.
This first commit aims to be backportable to 1.6.x, thus does not address the
Netware case which requires an incompatible change of the apr_proc_mutex_t to
a pointer type (the implementation is here since very similar to other changes
is this commit, but it is commented out for now, a simple follow up is coming
with the type change for trunk only...).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1733775 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_proc_mutex.h')
-rw-r--r-- | include/apr_proc_mutex.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/apr_proc_mutex.h b/include/apr_proc_mutex.h index d6f05d489..15312b2bd 100644 --- a/include/apr_proc_mutex.h +++ b/include/apr_proc_mutex.h @@ -154,9 +154,16 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_cleanup(void *mutex); APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex); /** - * Display the name of the mutex, as it relates to the actual method used. - * This matches the valid options for Apache's AcceptMutex directive - * @param mutex the name of the mutex + * Get the mechanism of the mutex, as it relates to the actual method + * used for the underlying apr_proc_mutex_t. + * @param mutex the mutex to get the mechanism from. + */ +APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex); + +/** + * Get the mechanism's name of the mutex, as it relates to the actual method + * used for the underlying apr_proc_mutex_t. + * @param mutex the mutex to get the mechanism's name from. */ APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex); |