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

Function ap_dump_mutexes

server/util_mutex.c:501–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501AP_CORE_DECLARE(void) ap_dump_mutexes(apr_pool_t *p, server_rec *s, apr_file_t *out)
502{
503 apr_hash_index_t *idx;
504 mutex_cfg_t *defcfg = apr_hash_get(mxcfg_by_type, "default", APR_HASH_KEY_STRING);
505 for (idx = apr_hash_first(p, mxcfg_by_type); idx; idx = apr_hash_next(idx))
506 {
507 mutex_cfg_t *mxcfg;
508 const char *name, *mech = "<unknown>";
509 const void *name_;
510 const char *dir = "";
511 apr_hash_this(idx, &name_, NULL, NULL);
512 name = name_;
513 mxcfg = mxcfg_lookup(p, name);
514 if (mxcfg == defcfg && strcmp(name, "default") != 0) {
515 apr_file_printf(out, "Mutex %s: using_defaults\n", name);
516 continue;
517 }
518 if (mxcfg->none) {
519 apr_file_printf(out, "Mutex %s: none\n", name);
520 continue;
521 }
522 switch (mxcfg->mech) {
523 case APR_LOCK_DEFAULT:
524 mech = "default";
525 break;
526#if APR_HAS_FCNTL_SERIALIZE
527 case APR_LOCK_FCNTL:
528 mech = "fcntl";
529 break;
530#endif
531#if APR_HAS_FLOCK_SERIALIZE
532 case APR_LOCK_FLOCK:
533 mech = "flock";
534 break;
535#endif
536#if APR_HAS_POSIXSEM_SERIALIZE
537 case APR_LOCK_POSIXSEM:
538 mech = "posixsem";
539 break;
540#endif
541#if APR_HAS_SYSVSEM_SERIALIZE
542 case APR_LOCK_SYSVSEM:
543 mech = "sysvsem";
544 break;
545#endif
546#if APR_HAS_PROC_PTHREAD_SERIALIZE
547 case APR_LOCK_PROC_PTHREAD:
548 mech = "pthread";
549 break;
550#endif
551 default:
552 ap_assert(0);
553 }
554
555 if (mxcfg->dir)
556 dir = ap_server_root_relative(p, mxcfg->dir);
557
558 apr_file_printf(out, "Mutex %s: dir=\"%s\" mechanism=%s %s\n", name, dir, mech,

Callers 2

core_dump_configFunction · 0.85
util_mutex.hFile · 0.85

Calls 2

mxcfg_lookupFunction · 0.85
ap_server_root_relativeFunction · 0.85

Tested by

no test coverage detected