summaryrefslogtreecommitdiff
path: root/apps/app_intercom.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-08-13 15:25:16 +0000
committerMark Spencer <markster@digium.com>2003-08-13 15:25:16 +0000
commit1bb58646de07501c96c53a963820ef70f73d50c5 (patch)
tree3f2cc11c392b1496cf6518e8b6eb99e8b04417a1 /apps/app_intercom.c
parent4a396046fec3026140078479ff73fe3a98728bee (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 '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;
}