Asterisk - The Open Source Telephony Project
18.5.0
|
Dialplan mutexes. More...
#include "asterisk.h"
#include <signal.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
#include "asterisk/astobj2.h"
#include "asterisk/utils.h"
#include "asterisk/cli.h"
Go to the source code of this file.
Data Structures | |
struct | channel_lock_frame |
struct | lock_frame |
struct | locklist |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | get_lock (struct ast_channel *chan, char *lockname, int trylock) |
static char * | handle_cli_locks_show (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | load_module (void) |
static void | lock_fixup (void *data, struct ast_channel *oldchan, struct ast_channel *newchan) |
static void | lock_free (void *data) |
static int | lock_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | trylock_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | unload_module (void) |
static int | unlock_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Dialplan mutexes" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_cli_entry | cli_locks_show = { .handler = handle_cli_locks_show , .summary = "List func_lock locks." ,} |
static struct ast_custom_function | lock_function |
static const struct ast_datastore_info | lock_info |
static struct locklist | locklist = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static struct ast_custom_function | trylock_function |
static int | unloading = 0 |
static struct ast_custom_function | unlock_function |
Dialplan mutexes.
Definition in file func_lock.c.
|
static |
Definition at line 542 of file func_lock.c.
|
static |
Definition at line 542 of file func_lock.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 542 of file func_lock.c.
|
static |
Definition at line 186 of file func_lock.c.
References ast_calloc, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_cond_init, ast_cond_signal, ast_cond_timedwait, ast_datastore_alloc, ast_datastore_free(), ast_free, AST_LIST_HEAD, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_module_ref, ast_mutex_destroy, ast_mutex_init, ast_mutex_lock, ast_mutex_unlock, ast_tvnow(), channel_lock_frame::channel, lock_frame::cond, lock_frame::count, ast_datastore::data, lock_frame::entries, channel_lock_frame::list, channel_lock_frame::lock_frame, LOG_ERROR, lock_frame::mutex, lock_frame::name, NULL, lock_frame::owner, lock_frame::requesters, ast_module_info::self, and unloading.
Referenced by lock_read(), and trylock_read().
|
static |
Definition at line 434 of file func_lock.c.
References ast_channel_name(), ast_cli(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_mutex_lock, ast_mutex_unlock, c, CLI_GENERATE, CLI_INIT, ast_cli_entry::command, lock_frame::entries, ast_cli_args::fd, lock_frame::mutex, lock_frame::name, NULL, lock_frame::owner, lock_frame::requesters, and ast_cli_entry::usage.
|
static |
Definition at line 532 of file func_lock.c.
References AST_CFE_READ, ast_cli_register, and ast_custom_function_register_escalating.
|
static |
Definition at line 165 of file func_lock.c.
References ast_channel_datastore_find(), AST_LIST_HEAD, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, channel_lock_frame::channel, ast_datastore::data, channel_lock_frame::list, channel_lock_frame::lock_frame, NULL, and lock_frame::owner.
|
static |
Definition at line 142 of file func_lock.c.
References ast_cond_signal, ast_free, AST_LIST_HEAD, AST_LIST_HEAD_DESTROY, AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, ast_module_unref, ast_mutex_lock, ast_mutex_unlock, channel_lock_frame::channel, lock_frame::cond, lock_frame::count, channel_lock_frame::list, channel_lock_frame::lock_frame, lock_frame::mutex, NULL, lock_frame::owner, and ast_module_info::self.
|
static |
Definition at line 410 of file func_lock.c.
References ast_autoservice_start(), ast_autoservice_stop(), ast_copy_string(), and get_lock().
|
static |
Definition at line 422 of file func_lock.c.
References ast_autoservice_start(), ast_autoservice_stop(), ast_copy_string(), and get_lock().
|
static |
Definition at line 485 of file func_lock.c.
References ast_cli_unregister(), ast_cond_destroy, ast_cond_wait, ast_custom_function_unregister(), ast_free, AST_LIST_HEAD_DESTROY, AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, ast_log, ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, lock_frame::cond, lock_frame::entries, LOG_WARNING, lock_frame::mutex, lock_frame::name, lock_frame::owner, lock_frame::requesters, and unloading.
|
static |
Definition at line 358 of file func_lock.c.
References ast_channel_datastore_find(), ast_cond_signal, ast_copy_string(), ast_debug, AST_LIST_HEAD, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_mutex_lock, ast_mutex_unlock, lock_frame::cond, lock_frame::count, ast_datastore::data, channel_lock_frame::list, channel_lock_frame::lock_frame, LOG_WARNING, lock_frame::mutex, lock_frame::name, NULL, and lock_frame::owner.
|
static |
Definition at line 542 of file func_lock.c.
|
static |
Definition at line 542 of file func_lock.c.
|
static |
Definition at line 483 of file func_lock.c.
|
static |
Definition at line 465 of file func_lock.c.
|
static |
Definition at line 115 of file func_lock.c.
Referenced by ast_dump_locks(), ast_find_lock_info(), ast_log_show_lock(), ast_mark_lock_acquired(), ast_mark_lock_failed(), ast_remove_lock_info(), ast_restore_lock_info(), ast_store_lock_info(), ast_suspend_lock_info(), dummy_start(), and lock_info_destroy().
|
static |
|
static |
Definition at line 471 of file func_lock.c.
|
static |
Definition at line 113 of file func_lock.c.
Referenced by get_lock(), and unload_module().
|
static |
Definition at line 477 of file func_lock.c.