Apache HTTPD
apr_global_mutex.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef APR_GLOBAL_MUTEX_H
18#define APR_GLOBAL_MUTEX_H
19
25#include "apr.h"
26#include "apr_proc_mutex.h" /* only for apr_lockmech_e */
27#include "apr_pools.h"
28#include "apr_errno.h"
29#if APR_PROC_MUTEX_IS_GLOBAL
30#include "apr_proc_mutex.h"
31#endif
32#include "apr_time.h"
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
44#if !APR_PROC_MUTEX_IS_GLOBAL || defined(DOXYGEN)
45
48
49/* Function definitions */
50
77 const char *fname,
80
94 const char *fname,
96
103
112
123
129
135
141
148
155
160
166
167#else /* APR_PROC_MUTEX_IS_GLOBAL */
168
169/* Some platforms [e.g. Win32] have cross process locks that are truly
170 * global locks, since there isn't the concept of cross-process locks.
171 * Define these platforms in terms of an apr_proc_mutex_t.
172 */
173
174#define apr_global_mutex_t apr_proc_mutex_t
175#define apr_global_mutex_create apr_proc_mutex_create
176#define apr_global_mutex_child_init apr_proc_mutex_child_init
177#define apr_global_mutex_lock apr_proc_mutex_lock
178#define apr_global_mutex_trylock apr_proc_mutex_trylock
179#define apr_global_mutex_unlock apr_proc_mutex_unlock
180#define apr_global_mutex_destroy apr_proc_mutex_destroy
181#define apr_global_mutex_lockfile apr_proc_mutex_lockfile
182#define apr_global_mutex_mech apr_proc_mutex_mech
183#define apr_global_mutex_name apr_proc_mutex_name
184#define apr_global_mutex_perms_set apr_proc_mutex_perms_set
185#define apr_global_mutex_pool_get apr_proc_mutex_pool_get
186
187#endif
188
191#ifdef __cplusplus
192}
193#endif
194
195#endif /* ndef APR_GLOBAL_MUTEX_H */
APR Error Codes.
APR memory allocation.
APR Process Locking Routines.
APR Time Library.
const char apr_lockmech_e apr_pool_t * pool
const char apr_lockmech_e mech
const char * fname
const void apr_status_t(*) apr_status_t(* APR_DECLARE)(void) apr_pool_pre_cleanup_register(apr_pool_t *p
Definition apr_pools.h:646
apr_size_t size
int apr_status_t
Definition apr_errno.h:44
#define APR_PERMS_SET_IMPLEMENT(type)
#define APR_POOL_DECLARE_ACCESSOR(type)
Definition apr_pools.h:81
apr_lockmech_e
apr_int64_t apr_interval_time_t
Definition apr_time.h:55
apr_thread_mutex_t * mutex
IN ULONG IN INT timeout