Asterisk - The Open Source Telephony Project GIT-master-3dee037
|
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 = AST_BUILDOPT_SUM, .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 554 of file func_lock.c.
|
static |
Definition at line 554 of file func_lock.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 554 of file func_lock.c.
|
static |
Definition at line 198 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, current, ast_datastore::data, channel_lock_frame::list, channel_lock_frame::lock_frame, lock_info, LOG_ERROR, NULL, ast_module_info::self, and unloading.
Referenced by lock_read(), and trylock_read().
|
static |
Definition at line 446 of file func_lock.c.
References a, 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, current, lock_frame::entries, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 544 of file func_lock.c.
References AST_CFE_READ, ast_cli_register, ast_custom_function_register_escalating, cli_locks_show, lock_function, trylock_function, and unlock_function.
|
static |
Definition at line 177 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, lock_info, NULL, and lock_frame::owner.
|
static |
Definition at line 154 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 422 of file func_lock.c.
References ast_autoservice_start(), ast_autoservice_stop(), ast_copy_string(), buf, get_lock(), and len().
|
static |
Definition at line 434 of file func_lock.c.
References ast_autoservice_start(), ast_autoservice_stop(), ast_copy_string(), buf, get_lock(), and len().
|
static |
Definition at line 497 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, cli_locks_show, current, lock_frame::entries, lock_function, LOG_WARNING, trylock_function, unloading, and unlock_function.
|
static |
Definition at line 370 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, buf, lock_frame::cond, lock_frame::count, ast_datastore::data, len(), channel_lock_frame::list, channel_lock_frame::lock_frame, lock_info, LOG_WARNING, lock_frame::mutex, lock_frame::name, NULL, and lock_frame::owner.
|
static |
Definition at line 554 of file func_lock.c.
|
static |
Definition at line 554 of file func_lock.c.
|
static |
Definition at line 495 of file func_lock.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 477 of file func_lock.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 127 of file func_lock.c.
Referenced by dummy_start(), get_lock(), lock_fixup(), and unlock_read().
|
static |
|
static |
Definition at line 483 of file func_lock.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 125 of file func_lock.c.
Referenced by get_lock(), and unload_module().
|
static |
Definition at line 489 of file func_lock.c.
Referenced by load_module(), and unload_module().