From 1f67010c94d47ccd7971b0cfcece061827c6e115 Mon Sep 17 00:00:00 2001 From: Jonathan Patschke Date: Mon, 4 Apr 2016 07:57:52 -0500 Subject: [PATCH] Mutex and Condition Variable Initialisation Initialise the mutex and two condition variables inside pc_queue during pc_queue_init(). --- rtsp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtsp.c b/rtsp.c index bc6df63a..66cd9b9b 100644 --- a/rtsp.c +++ b/rtsp.c @@ -147,6 +147,9 @@ void ask_other_rtsp_conversation_threads_to_stop(pthread_t except_this_thread); void pc_queue_init(pc_queue *the_queue, char *items, size_t item_size, uint32_t number_of_items) { + pthread_mutex_init(&the_queue->pc_queue_lock, NULL); + pthread_cond_init(&the_queue->pc_queue_item_added_signal, NULL); + pthread_cond_init(&the_queue->pc_queue_item_removed_signal, NULL); the_queue->item_size = item_size; the_queue->items = items; the_queue->count = 0; -- 2.47.3