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 /enum.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 'enum.c')
-rwxr-xr-x | enum.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -76,7 +76,7 @@ static struct enum_search { static int enumver = 0; -static pthread_mutex_t enumlock = AST_MUTEX_INITIALIZER; +static ast_mutex_t enumlock = AST_MUTEX_INITIALIZER; static int skip_name(unsigned char *s, int len) { @@ -291,7 +291,7 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds #endif for(;;) { - ast_pthread_mutex_lock(&enumlock); + ast_mutex_lock(&enumlock); if (version != enumver) { /* Ooh, a reload... */ s = toplevs; @@ -301,7 +301,7 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds if (s) { strcpy(tmp + newpos, s->toplev); } - ast_pthread_mutex_unlock(&enumlock); + ast_mutex_unlock(&enumlock); if (!s) break; res = res_nsearch(&enumstate, tmp, C_IN, T_NAPTR, answer, sizeof(answer)); @@ -344,7 +344,7 @@ int ast_enum_init(void) struct ast_variable *v; /* Destroy existing list */ - ast_pthread_mutex_lock(&enumlock); + ast_mutex_lock(&enumlock); s = toplevs; while(s) { sl = s; @@ -374,7 +374,7 @@ int ast_enum_init(void) toplevs = enum_newtoplev(TOPLEV); } enumver++; - ast_pthread_mutex_unlock(&enumlock); + ast_mutex_unlock(&enumlock); return 0; } |