diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-13 15:25:16 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-13 15:25:16 +0000 |
commit | dbc9edcaac6ec1d2059f4c5bcd27cca6c266f5bf (patch) | |
tree | 3f2cc11c392b1496cf6518e8b6eb99e8b04417a1 /enum.c | |
parent | 231b9aad4020331a8c68d1a2826ee1ef930ec57b (diff) |
Totally revamp thread debugging to support locating and removing deadlocks
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1310 f38db490-d61c-443f-a65b-d21fe96a405b
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; } |