commtechs: BUGFIX deadlock in thread init
This commit is contained in:
parent
60214d62f0
commit
c99d8be100
|
@ -52,8 +52,10 @@ int init_producer_thread(void)
|
||||||
thread_num = get_thread_number();
|
thread_num = get_thread_number();
|
||||||
if (init_thread_comm(&tcomms[thread_num]))
|
if (init_thread_comm(&tcomms[thread_num]))
|
||||||
{
|
{
|
||||||
|
pthread_mutex_lock(&init_lock);
|
||||||
error = 1;
|
error = 1;
|
||||||
pthread_cond_signal(&init_cond);
|
pthread_cond_signal(&init_cond);
|
||||||
|
pthread_mutex_unlock(&init_lock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
pthread_mutex_lock(&init_lock);
|
pthread_mutex_lock(&init_lock);
|
||||||
|
|
Loading…
Reference in New Issue