MCPcopy Create free account
hub / github.com/apache/httpd / ap_mutex_register

Function ap_mutex_register

server/util_mutex.c:254–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254AP_DECLARE(apr_status_t) ap_mutex_register(apr_pool_t *pconf,
255 const char *type,
256 const char *default_dir,
257 apr_lockmech_e default_mech,
258 apr_int32_t options)
259{
260 mutex_cfg_t *mxcfg = apr_pcalloc(pconf, sizeof *mxcfg);
261
262 if ((options & ~(AP_MUTEX_ALLOW_NONE | AP_MUTEX_DEFAULT_NONE))) {
263 return APR_EINVAL;
264 }
265
266 ap_mutex_init(pconf); /* in case this mod's pre-config ran before core's */
267
268 mxcfg->options = options;
269 if (options & AP_MUTEX_DEFAULT_NONE) {
270 mxcfg->none = 1;
271 }
272 mxcfg->dir = default_dir; /* usually NULL */
273 mxcfg->mech = default_mech; /* usually APR_LOCK_DEFAULT */
274 apr_hash_set(mxcfg_by_type, type, APR_HASH_KEY_STRING, mxcfg);
275
276 return APR_SUCCESS;
277}
278
279static int mutex_needs_file(apr_lockmech_e mech)
280{

Callers 13

socache_precfgFunction · 0.85
pre_initFunction · 0.85
authn_cache_precfgFunction · 0.85
wd_pre_config_hookFunction · 0.85
proxy_pre_configFunction · 0.85
balancer_pre_configFunction · 0.85
pre_configFunction · 0.85
ssl_hook_pre_configFunction · 0.85
exipc_pre_configFunction · 0.85
util_ldap_pre_configFunction · 0.85
lua_pre_configFunction · 0.85
prefork_pre_configFunction · 0.85

Calls 1

ap_mutex_initFunction · 0.85

Tested by

no test coverage detected