fix signaling of mtch_cvar in phch_common

fixes possible race cond when more than one worker
is waiting for this cond and only one is ever woken up
master
Andre Puschmann 6 years ago
parent 3d458319c9
commit 631472760a

@ -437,7 +437,7 @@ void phch_common::set_mch_period_stop(uint32_t stop)
pthread_mutex_lock(&mtch_mutex); pthread_mutex_lock(&mtch_mutex);
have_mtch_stop = true; have_mtch_stop = true;
mch_period_stop = stop; mch_period_stop = stop;
pthread_cond_signal(&mtch_cvar); pthread_cond_broadcast(&mtch_cvar);
pthread_mutex_unlock(&mtch_mutex); pthread_mutex_unlock(&mtch_mutex);
} }

Loading…
Cancel
Save