Commit 159a0fcc authored by Karl Heyes's avatar Karl Heyes
Browse files

fix race condition for enabling any metadata updates on USR1 signal.

svn path=/trunk/ices/; revision=4389
parent 55d9a7cd
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* - Main producer control loop. Fetches data from input modules, and controls * - Main producer control loop. Fetches data from input modules, and controls
* submission of these to the instance threads. Timing control happens here. * submission of these to the instance threads. Timing control happens here.
* *
* $Id: input.c,v 1.20 2002/12/29 11:28:19 msmith Exp $ * $Id: input.c,v 1.21 2003/03/02 19:14:46 karl Exp $
* *
* Copyright (c) 2001 Michael Smith <msmith@labyrinth.net.au> * Copyright (c) 2001 Michael Smith <msmith@labyrinth.net.au>
* *
...@@ -240,6 +240,11 @@ void input_loop(void) ...@@ -240,6 +240,11 @@ void input_loop(void)
int inc_count; int inc_count;
int not_waiting_for_critical; int not_waiting_for_critical;
thread_cond_create(&ices_config->queue_cond);
thread_cond_create(&ices_config->event_pending_cond);
thread_mutex_create(&ices_config->refcount_lock);
thread_mutex_create(&ices_config->flush_lock);
while(ices_config->playlist_module && modules[current_module].open) while(ices_config->playlist_module && modules[current_module].open)
{ {
if(!strcmp(ices_config->playlist_module, modules[current_module].name)) if(!strcmp(ices_config->playlist_module, modules[current_module].name))
...@@ -259,11 +264,6 @@ void input_loop(void) ...@@ -259,11 +264,6 @@ void input_loop(void)
ices_config->inmod = inmod; ices_config->inmod = inmod;
thread_cond_create(&ices_config->queue_cond);
thread_cond_create(&ices_config->event_pending_cond);
thread_mutex_create(&ices_config->refcount_lock);
thread_mutex_create(&ices_config->flush_lock);
/* ok, basic config stuff done. Now, we want to start all our listening /* ok, basic config stuff done. Now, we want to start all our listening
* threads. * threads.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment