From 1bb58646de07501c96c53a963820ef70f73d50c5 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Wed, 13 Aug 2003 15:25:16 +0000 Subject: 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 --- channels/chan_modem_bestdata.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'channels/chan_modem_bestdata.c') diff --git a/channels/chan_modem_bestdata.c b/channels/chan_modem_bestdata.c index 90cc87828..10732dca7 100755 --- a/channels/chan_modem_bestdata.c +++ b/channels/chan_modem_bestdata.c @@ -39,7 +39,7 @@ static char *breakcmd = "\020!"; static char *desc = "BestData (Conexant V.90 Chipset) VoiceModem Driver"; static int usecnt; -static pthread_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; +static ast_mutex_t usecnt_lock = AST_MUTEX_INITIALIZER; static char *bestdata_idents[] = { /* Identify BestData Modem */ @@ -439,17 +439,17 @@ static char *bestdata_identify(struct ast_modem_pvt *p) static void bestdata_incusecnt(void) { - ast_pthread_mutex_lock(&usecnt_lock); + ast_mutex_lock(&usecnt_lock); usecnt++; - ast_pthread_mutex_unlock(&usecnt_lock); + ast_mutex_unlock(&usecnt_lock); ast_update_use_count(); } static void bestdata_decusecnt(void) { - ast_pthread_mutex_lock(&usecnt_lock); + ast_mutex_lock(&usecnt_lock); usecnt++; - ast_pthread_mutex_unlock(&usecnt_lock); + ast_mutex_unlock(&usecnt_lock); ast_update_use_count(); } @@ -570,9 +570,9 @@ static struct ast_modem_driver bestdata_driver = int usecount(void) { int res; - ast_pthread_mutex_lock(&usecnt_lock); + ast_mutex_lock(&usecnt_lock); res = usecnt; - ast_pthread_mutex_unlock(&usecnt_lock); + ast_mutex_unlock(&usecnt_lock); return res; } -- cgit v1.2.3