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

Function ap_mutex_init

server/util_mutex.c:145–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143static apr_hash_t *mxcfg_by_type;
144
145AP_DECLARE_NONSTD(void) ap_mutex_init(apr_pool_t *p)
146{
147 mutex_cfg_t *def;
148
149 if (mxcfg_by_type) {
150 return;
151 }
152
153 mxcfg_by_type = apr_hash_make(p);
154 apr_pool_cleanup_register(p, &mxcfg_by_type, ap_pool_cleanup_set_null,
155 apr_pool_cleanup_null);
156
157 /* initialize default mutex configuration */
158 def = apr_pcalloc(p, sizeof *def);
159 def->mech = APR_LOCK_DEFAULT;
160 def->dir = ap_runtime_dir_relative(p, "");
161 apr_hash_set(mxcfg_by_type, "default", APR_HASH_KEY_STRING, def);
162}
163
164AP_DECLARE_NONSTD(const char *)ap_set_mutex(cmd_parms *cmd, void *dummy,
165 const char *arg)

Callers 3

core_pre_configFunction · 0.85
ap_mutex_registerFunction · 0.85
util_mutex.hFile · 0.85

Calls 1

ap_runtime_dir_relativeFunction · 0.85

Tested by

no test coverage detected