diff options
author | Mark Spencer <markster@digium.com> | 2003-08-13 15:25:16 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-08-13 15:25:16 +0000 |
commit | 1bb58646de07501c96c53a963820ef70f73d50c5 (patch) | |
tree | 3f2cc11c392b1496cf6518e8b6eb99e8b04417a1 /apps/app_meetme.c | |
parent | 4a396046fec3026140078479ff73fe3a98728bee (diff) |
Totally revamp thread debugging to support locating and removing deadlocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_meetme.c')
-rwxr-xr-x | apps/app_meetme.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 12b0ce590..a26392d02 100755 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -72,7 +72,7 @@ static struct conf { struct conf *next; } *confs; -static pthread_mutex_t conflock = AST_MUTEX_INITIALIZER; +static ast_mutex_t conflock = AST_MUTEX_INITIALIZER; #include "enter.h" #include "leave.h" @@ -112,7 +112,7 @@ static void conf_play(struct conf *conf, int sound) { unsigned char *data; int len; - ast_pthread_mutex_lock(&conflock); + ast_mutex_lock(&conflock); switch(sound) { case ENTER: data = enter; @@ -128,14 +128,14 @@ static void conf_play(struct conf *conf, int sound) } if (data) careful_write(conf->fd, data, len); - pthread_mutex_unlock(&conflock); + ast_mutex_unlock(&conflock); } static struct conf *build_conf(char *confno, int make) { struct conf *cnf; struct zt_confinfo ztc; - ast_pthread_mutex_lock(&conflock); + ast_mutex_lock(&conflock); cnf = confs; while(cnf) { if (!strcmp(confno, cnf->confno)) @@ -179,7 +179,7 @@ static struct conf *build_conf(char *confno, int make) cnfout: if (cnf && make) cnf->users++; - ast_pthread_mutex_unlock(&conflock); + ast_mutex_unlock(&conflock); return cnf; } @@ -431,7 +431,7 @@ zapretry: outrun: - ast_pthread_mutex_lock(&conflock); + ast_mutex_lock(&conflock); /* Clean up */ conf->users--; if (!conf->users) { @@ -453,7 +453,7 @@ outrun: close(conf->fd); free(conf); } - pthread_mutex_unlock(&conflock); + ast_mutex_unlock(&conflock); return ret; } |