aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-09 01:45:08 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-09 01:45:08 +0000
commit7d00f23ad44d18c7041c925f7f556d5d1fe641ac (patch)
treee9c8ee99dcb97720b3dfb49c87b2f2c0b6f6f6b6 /pbx.c
parent523e96fd0323806ed98ca6ce3e58831fc5a392dc (diff)
Merge FreeBSD locking fixes (bug #1411)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3176 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/pbx.c b/pbx.c
index 02acc3ded..02c006b69 100755
--- a/pbx.c
+++ b/pbx.c
@@ -176,7 +176,7 @@ int pbx_builtin_setvar(struct ast_channel *, void *);
void pbx_builtin_setvar_helper(struct ast_channel *chan, char *name, char *value);
char *pbx_builtin_getvar_helper(struct ast_channel *chan, char *name);
-static struct varshead globals = AST_LIST_HEAD_INITIALIZER(varshead);
+static struct varshead globals;
static struct pbx_builtin {
char name[AST_MAX_APP];
@@ -362,18 +362,18 @@ static struct pbx_builtin {
};
/* Lock for the application list */
-static ast_mutex_t applock = AST_MUTEX_INITIALIZER;
+AST_MUTEX_DEFINE_STATIC(applock);
static struct ast_context *contexts = NULL;
/* Lock for the ast_context list */
-static ast_mutex_t conlock = AST_MUTEX_INITIALIZER;
+AST_MUTEX_DEFINE_STATIC(conlock);
static struct ast_app *apps = NULL;
/* Lock for switches */
-static ast_mutex_t switchlock = AST_MUTEX_INITIALIZER;
+AST_MUTEX_DEFINE_STATIC(switchlock);
struct ast_switch *switches = NULL;
/* Lock for extension state notifys */
-static ast_mutex_t hintlock = AST_MUTEX_INITIALIZER;
+AST_MUTEX_DEFINE_STATIC(hintlock);
static int stateid = 1;
struct ast_hint *hints = NULL;
struct ast_state_cb *statecbs = NULL;
@@ -4654,6 +4654,7 @@ int load_pbx(void)
ast_verbose( "Asterisk PBX Core Initializing\n");
ast_verbose( "Registering builtin applications:\n");
}
+ AST_LIST_HEAD_INIT(&globals);
ast_cli_register(&show_applications_cli);
ast_cli_register(&show_application_cli);
ast_cli_register(&show_dialplan_cli);