aboutsummaryrefslogtreecommitdiffstats
path: root/codecs
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-13 15:25:16 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-13 15:25:16 +0000
commitdbc9edcaac6ec1d2059f4c5bcd27cca6c266f5bf (patch)
tree3f2cc11c392b1496cf6518e8b6eb99e8b04417a1 /codecs
parent231b9aad4020331a8c68d1a2826ee1ef930ec57b (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 'codecs')
-rwxr-xr-xcodecs/codec_a_mu.c6
-rwxr-xr-xcodecs/codec_adpcm.c6
-rwxr-xr-xcodecs/codec_alaw.c6
-rwxr-xr-xcodecs/codec_g723_1.c6
-rwxr-xr-xcodecs/codec_gsm.c6
-rwxr-xr-xcodecs/codec_ilbc.c6
-rwxr-xr-xcodecs/codec_lpc10.c6
-rwxr-xr-xcodecs/codec_mp3_d.c6
-rwxr-xr-xcodecs/codec_speex.c6
-rwxr-xr-xcodecs/codec_ulaw.c6
10 files changed, 30 insertions, 30 deletions
diff --git a/codecs/codec_a_mu.c b/codecs/codec_a_mu.c
index 3d1496c6c..4b6634262 100755
--- a/codecs/codec_a_mu.c
+++ b/codecs/codec_a_mu.c
@@ -27,7 +27,7 @@
#define BUFFER_SIZE 8096 /* size for the translation buffers */
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt = 0;
static char *tdesc = "A-law and Mulaw direct Coder/Decoder";
@@ -274,13 +274,13 @@ int
unload_module (void)
{
int res;
- ast_pthread_mutex_lock (&localuser_lock);
+ ast_mutex_lock (&localuser_lock);
res = ast_unregister_translator (&ulawtoalaw);
if (!res)
res = ast_unregister_translator (&alawtoulaw);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock (&localuser_lock);
+ ast_mutex_unlock (&localuser_lock);
return res;
}
diff --git a/codecs/codec_adpcm.c b/codecs/codec_adpcm.c
index 641f28b7e..584538367 100755
--- a/codecs/codec_adpcm.c
+++ b/codecs/codec_adpcm.c
@@ -28,7 +28,7 @@
#define BUFFER_SIZE 8096 /* size for the translation buffers */
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt = 0;
static char *tdesc = "Adaptive Differential PCM Coder/Decoder";
@@ -500,13 +500,13 @@ int
unload_module (void)
{
int res;
- ast_pthread_mutex_lock (&localuser_lock);
+ ast_mutex_lock (&localuser_lock);
res = ast_unregister_translator (&lintoadpcm);
if (!res)
res = ast_unregister_translator (&adpcmtolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock (&localuser_lock);
+ ast_mutex_unlock (&localuser_lock);
return res;
}
diff --git a/codecs/codec_alaw.c b/codecs/codec_alaw.c
index 192b112c9..08baba4bd 100755
--- a/codecs/codec_alaw.c
+++ b/codecs/codec_alaw.c
@@ -26,7 +26,7 @@
#define BUFFER_SIZE 8096 /* size for the translation buffers */
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt = 0;
static char *tdesc = "A-law Coder/Decoder";
@@ -332,13 +332,13 @@ int
unload_module (void)
{
int res;
- ast_pthread_mutex_lock (&localuser_lock);
+ ast_mutex_lock (&localuser_lock);
res = ast_unregister_translator (&lintoalaw);
if (!res)
res = ast_unregister_translator (&alawtolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock (&localuser_lock);
+ ast_mutex_unlock (&localuser_lock);
return res;
}
diff --git a/codecs/codec_g723_1.c b/codecs/codec_g723_1.c
index 94ae898aa..423d24695 100755
--- a/codecs/codec_g723_1.c
+++ b/codecs/codec_g723_1.c
@@ -56,7 +56,7 @@
#include "slin_g723_ex.h"
#include "g723_slin_ex.h"
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt=0;
#ifdef ANNEX_B
@@ -363,13 +363,13 @@ static struct ast_translator lintog723 =
int unload_module(void)
{
int res;
- ast_pthread_mutex_lock(&localuser_lock);
+ ast_mutex_lock(&localuser_lock);
res = ast_unregister_translator(&lintog723);
if (!res)
res = ast_unregister_translator(&g723tolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock(&localuser_lock);
+ ast_mutex_unlock(&localuser_lock);
return res;
}
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c
index 68efbf92b..f0efe1a82 100755
--- a/codecs/codec_gsm.c
+++ b/codecs/codec_gsm.c
@@ -39,7 +39,7 @@
#include "slin_gsm_ex.h"
#include "gsm_slin_ex.h"
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt=0;
static char *tdesc = "GSM/PCM16 (signed linear) Codec Translator";
@@ -253,13 +253,13 @@ static struct ast_translator lintogsm =
int unload_module(void)
{
int res;
- ast_pthread_mutex_lock(&localuser_lock);
+ ast_mutex_lock(&localuser_lock);
res = ast_unregister_translator(&lintogsm);
if (!res)
res = ast_unregister_translator(&gsmtolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock(&localuser_lock);
+ ast_mutex_unlock(&localuser_lock);
return res;
}
diff --git a/codecs/codec_ilbc.c b/codecs/codec_ilbc.c
index 014151b87..e11c9703e 100755
--- a/codecs/codec_ilbc.c
+++ b/codecs/codec_ilbc.c
@@ -35,7 +35,7 @@
#define USE_ILBC_ENHANCER 0
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt=0;
static char *tdesc = "iLBC/PCM16 (signed linear) Codec Translator";
@@ -245,13 +245,13 @@ static struct ast_translator lintoilbc =
int unload_module(void)
{
int res;
- ast_pthread_mutex_lock(&localuser_lock);
+ ast_mutex_lock(&localuser_lock);
res = ast_unregister_translator(&lintoilbc);
if (!res)
res = ast_unregister_translator(&ilbctolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock(&localuser_lock);
+ ast_mutex_unlock(&localuser_lock);
return res;
}
diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c
index 3c5d2c3ab..ffd1ddc23 100755
--- a/codecs/codec_lpc10.c
+++ b/codecs/codec_lpc10.c
@@ -43,7 +43,7 @@
#define LPC10_BYTES_IN_COMPRESSED_FRAME (LPC10_BITS_IN_COMPRESSED_FRAME + 7)/8
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt=0;
static char *tdesc = "LPC10 2.4kbps (signed linear) Voice Coder";
@@ -330,13 +330,13 @@ static struct ast_translator lintolpc10 =
int unload_module(void)
{
int res;
- ast_pthread_mutex_lock(&localuser_lock);
+ ast_mutex_lock(&localuser_lock);
res = ast_unregister_translator(&lintolpc10);
if (!res)
res = ast_unregister_translator(&lpc10tolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock(&localuser_lock);
+ ast_mutex_unlock(&localuser_lock);
return res;
}
diff --git a/codecs/codec_mp3_d.c b/codecs/codec_mp3_d.c
index 09215ddd7..9ff3961aa 100755
--- a/codecs/codec_mp3_d.c
+++ b/codecs/codec_mp3_d.c
@@ -41,7 +41,7 @@
#define MAX_FRAME_SIZE 1441
#define MAX_OUTPUT_LEN 2304
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt=0;
static char *tdesc = "MP3/PCM16 (signed linear) Translator (Decoder only)";
@@ -287,11 +287,11 @@ static struct ast_translator mp3tolin =
int unload_module(void)
{
int res;
- ast_pthread_mutex_lock(&localuser_lock);
+ ast_mutex_lock(&localuser_lock);
res = ast_unregister_translator(&mp3tolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock(&localuser_lock);
+ ast_mutex_unlock(&localuser_lock);
return res;
}
diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c
index 3c2e4f519..ae731fafa 100755
--- a/codecs/codec_speex.c
+++ b/codecs/codec_speex.c
@@ -37,7 +37,7 @@
#include "slin_speex_ex.h"
#include "speex_slin_ex.h"
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt=0;
static char *tdesc = "Speex/PCM16 (signed linear) Codec Translator";
@@ -275,13 +275,13 @@ static struct ast_translator lintospeex =
int unload_module(void)
{
int res;
- ast_pthread_mutex_lock(&localuser_lock);
+ ast_mutex_lock(&localuser_lock);
res = ast_unregister_translator(&lintospeex);
if (!res)
res = ast_unregister_translator(&speextolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock(&localuser_lock);
+ ast_mutex_unlock(&localuser_lock);
return res;
}
diff --git a/codecs/codec_ulaw.c b/codecs/codec_ulaw.c
index d536bf052..41101897d 100755
--- a/codecs/codec_ulaw.c
+++ b/codecs/codec_ulaw.c
@@ -26,7 +26,7 @@
#define BUFFER_SIZE 8096 /* size for the translation buffers */
-static pthread_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t localuser_lock = AST_MUTEX_INITIALIZER;
static int localusecnt = 0;
static char *tdesc = "Mu-law Coder/Decoder";
@@ -332,13 +332,13 @@ int
unload_module (void)
{
int res;
- ast_pthread_mutex_lock (&localuser_lock);
+ ast_mutex_lock (&localuser_lock);
res = ast_unregister_translator (&lintoulaw);
if (!res)
res = ast_unregister_translator (&ulawtolin);
if (localusecnt)
res = -1;
- ast_pthread_mutex_unlock (&localuser_lock);
+ ast_mutex_unlock (&localuser_lock);
return res;
}