mirror of https://git.kore.io/kore.git
Check return value for pthread_mutex_init()
This commit is contained in:
parent
257486d74a
commit
c1bc0ce13f
|
@ -48,10 +48,13 @@ static void task_thread_spawn(struct kore_task_thread **);
|
|||
void
|
||||
kore_task_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
threads = 0;
|
||||
|
||||
TAILQ_INIT(&task_threads);
|
||||
pthread_mutex_init(&task_thread_lock, NULL);
|
||||
if ((r = pthread_mutex_init(&task_thread_lock, NULL)) != 0)
|
||||
fatal("kore_task_init: pthread_mutex_init: %d", r);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue