Asterisk - The Open Source Telephony Project GIT-master-b023714
|
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 = ASTERISK_GPL_KEY , .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 = AST_LIST_HEAD_INIT_VALUE |
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 563 of file func_lock.c.
|
static |
Definition at line 563 of file func_lock.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 563 of file func_lock.c.
|
static |
Definition at line 207 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 455 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, test_val::name, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 553 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 186 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 163 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 431 of file func_lock.c.
References ast_autoservice_start(), ast_autoservice_stop(), ast_copy_string(), buf, get_lock(), and len().
|
static |
Definition at line 443 of file func_lock.c.
References ast_autoservice_start(), ast_autoservice_stop(), ast_copy_string(), buf, get_lock(), and len().
|
static |
Definition at line 506 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 379 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 563 of file func_lock.c.
|
static |
Definition at line 563 of file func_lock.c.
|
static |
Definition at line 504 of file func_lock.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 486 of file func_lock.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 136 of file func_lock.c.
Referenced by dummy_start(), get_lock(), lock_fixup(), and unlock_read().
|
static |
|
static |
Definition at line 492 of file func_lock.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 134 of file func_lock.c.
Referenced by get_lock(), and unload_module().
|
static |
Definition at line 498 of file func_lock.c.
Referenced by load_module(), and unload_module().