From 975765289b3348219d0db8b2d64e2f4f7747f9f2 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 25 Jun 2009 14:17:21 -0500 Subject: [PATCH] made sure all cond_wait and cond_signal calls are inside lock/unlock calls --- softsynth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/softsynth.c b/softsynth.c index 258d6e0..35d01fd 100644 --- a/softsynth.c +++ b/softsynth.c @@ -47,8 +47,8 @@ static void queue_add_cmd(enum command_t cmd, enum adjust_t adj, int value) entry->value = value; pthread_mutex_lock(&queue_guard); queue_add((void *) entry); - pthread_mutex_unlock(&queue_guard); pthread_cond_signal(&runner_awake); + pthread_mutex_unlock(&queue_guard); } static void queue_add_text(char *txt, size_t length) @@ -71,8 +71,8 @@ static void queue_add_text(char *txt, size_t length) entry->len = length; pthread_mutex_lock(&queue_guard); queue_add((void *) entry); - pthread_mutex_unlock(&queue_guard); pthread_cond_signal(&runner_awake); + pthread_mutex_unlock(&queue_guard); } static int process_command(struct synth_t *s, char *buf, int start)