aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_intercom.c
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 /apps/app_intercom.c
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 'apps/app_intercom.c')
-rwxr-xr-xapps/app_intercom.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_intercom.c b/apps/app_intercom.c
index bf139e0b9..c4be328dd 100755
--- a/apps/app_intercom.c
+++ b/apps/app_intercom.c
@@ -52,26 +52,26 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
-static pthread_mutex_t sound_lock = AST_MUTEX_INITIALIZER;
+static ast_mutex_t sound_lock = AST_MUTEX_INITIALIZER;
static int sound = -1;
static int write_audio(short *data, int len)
{
int res;
struct audio_buf_info info;
- ast_pthread_mutex_lock(&sound_lock);
+ ast_mutex_lock(&sound_lock);
if (sound < 0) {
ast_log(LOG_WARNING, "Sound device closed?\n");
- ast_pthread_mutex_unlock(&sound_lock);
+ ast_mutex_unlock(&sound_lock);
return -1;
}
if (ioctl(sound, SNDCTL_DSP_GETOSPACE, &info)) {
ast_log(LOG_WARNING, "Unable to read output space\n");
- ast_pthread_mutex_unlock(&sound_lock);
+ ast_mutex_unlock(&sound_lock);
return -1;
}
res = write(sound, data, len);
- ast_pthread_mutex_unlock(&sound_lock);
+ ast_mutex_unlock(&sound_lock);
return res;
}