#include "mutex.h"
#include <stdio.h>
Include dependency graph for mutex.c:
Go to the source code of this file.
Functions | |
bs_status | init_mutexes (apr_pool_t *mp) |
void | lock_option_mux (void) |
void | unlock_option_mux (void) |
void | lock_pool_mux (void) |
void | unlock_pool_mux (void) |
void | lock_module_mux (void) |
void | unlock_module_mux (void) |
void | lock_service_mux (void) |
void | unlock_service_mux (void) |
void | lock_node_mux (void) |
void | unlock_node_mux (void) |
void | lock_thread_mux (void) |
void | unlock_thread_mux (void) |
Variables | |
static apr_thread_mutex_t * | option_mux |
static apr_thread_mutex_t * | pool_mux |
static apr_thread_mutex_t * | module_mux |
static apr_thread_mutex_t * | service_mux |
static apr_thread_mutex_t * | node_mux |
static apr_thread_mutex_t * | thread_mux |
bs_status init_mutexes | ( | apr_pool_t * | mp | ) |
Create all the mutexes.
Definition at line 35 of file mutex.c.
References BS_ERROR, BS_OK, module_mux, node_mux, option_mux, pool_mux, runtestsuite::rv, service_mux, and thread_mux.
Referenced by main().
void lock_module_mux | ( | void | ) | [inline] |
Lock the mutex associated with the module subsystem. Especially when using the global module list which holds module information.
Definition at line 75 of file mutex.c.
References module_mux.
Referenced by get_module_descriptions(), get_module_info(), load_module(), unload_all_modules(), and unload_module().
void lock_node_mux | ( | void | ) | [inline] |
Lock the mutex associated with the nodes subsystem.
Definition at line 99 of file mutex.c.
References node_mux.
Referenced by add_node(), get_servicing_node(), node_already_known(), and remove_node().
void lock_option_mux | ( | void | ) | [inline] |
Lock the mutex associated with the option mutex. Use this function before accessing global settings variables, such as global_module_dir.
Definition at line 51 of file mutex.c.
References option_mux.
Referenced by load_module(), and set_definitions().
void lock_pool_mux | ( | void | ) | [inline] |
Lock the mutex associated with the global memory pool. Use this function before using the global_mp variable.
Definition at line 63 of file mutex.c.
References pool_mux.
Referenced by add_node(), add_service(), handle_service_request(), and load_module().
void lock_service_mux | ( | void | ) | [inline] |
Lock the mutex associated with the service subsystem.
Definition at line 87 of file mutex.c.
References service_mux.
Referenced by add_service(), get_services(), handle_service_request(), and remove_service().
void lock_thread_mux | ( | void | ) | [inline] |
Lock the mutex associated with the thread subsystem.
Definition at line 110 of file mutex.c.
References thread_mux.
Referenced by add_to_socket_list(), lets_go_threaded(), remove_from_socket_list(), and shutdown_thread_main().
void unlock_module_mux | ( | void | ) | [inline] |
Unlock the mutex associated with the module subsystem. Especially when using the global module list which holds module information.
Definition at line 81 of file mutex.c.
References module_mux.
Referenced by get_module_descriptions(), get_module_info(), load_module(), unload_all_modules(), and unload_module().
void unlock_node_mux | ( | void | ) | [inline] |
Unlock the mutex associated with the nodes subsystem.
Definition at line 105 of file mutex.c.
References node_mux.
Referenced by add_node(), get_servicing_node(), node_already_known(), and remove_node().
void unlock_option_mux | ( | void | ) | [inline] |
Unlock the mutex associated with the option mutex. Use this function after accessing global settings variables, such as global_module_dir.
Definition at line 57 of file mutex.c.
References option_mux.
Referenced by load_module(), and set_definitions().
void unlock_pool_mux | ( | void | ) | [inline] |
Unlock the mutex associated with the global memory pool. Use this function after using the global_mp variable.
Definition at line 69 of file mutex.c.
References pool_mux.
Referenced by add_node(), add_service(), handle_service_request(), and load_module().
void unlock_service_mux | ( | void | ) | [inline] |
Unlock the mutex associated with the service subsystem.
Definition at line 93 of file mutex.c.
References service_mux.
Referenced by add_service(), get_services(), handle_service_request(), and remove_service().
void unlock_thread_mux | ( | void | ) | [inline] |
Unlock the mutex associated with the thread subsystem.
Definition at line 116 of file mutex.c.
References thread_mux.
Referenced by add_to_socket_list(), lets_go_threaded(), remove_from_socket_list(), and shutdown_thread_main().
apr_thread_mutex_t* module_mux [static] |
Mutex for the module subsystem.
Definition at line 17 of file mutex.c.
Referenced by init_mutexes(), lock_module_mux(), and unlock_module_mux().
apr_thread_mutex_t* node_mux [static] |
Mutex for the nodes subsystem.
Definition at line 27 of file mutex.c.
Referenced by init_mutexes(), lock_node_mux(), and unlock_node_mux().
apr_thread_mutex_t* option_mux [static] |
Mutex for the several options, which are stored in global variables
Definition at line 7 of file mutex.c.
Referenced by init_mutexes(), lock_option_mux(), and unlock_option_mux().
apr_thread_mutex_t* pool_mux [static] |
Mutex for the global memory pool.
Definition at line 12 of file mutex.c.
Referenced by init_mutexes(), lock_pool_mux(), and unlock_pool_mux().
apr_thread_mutex_t* service_mux [static] |
Mutex for the services subsystem.
Definition at line 22 of file mutex.c.
Referenced by init_mutexes(), lock_service_mux(), and unlock_service_mux().
apr_thread_mutex_t* thread_mux [static] |
Mutex for the thread subsystem.
Definition at line 32 of file mutex.c.
Referenced by init_mutexes(), lock_thread_mux(), and unlock_thread_mux().