made sure all cond_wait and cond_signal calls are inside lock/unlock

calls
This commit is contained in:
William Hubbs 2009-06-25 14:17:21 -05:00
commit 975765289b

View file

@ -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)