- pthread_cond_init(&wq->flush_cond, NULL);
- pthread_mutex_init(&wq->flush_lock, NULL);
- pthread_mutex_init(&wq->stat_lock, NULL);
+
+ ret = mutex_cond_init_pshared(&wq->flush_lock, &wq->flush_cond);
+ if (ret)
+ goto err;
+ ret = mutex_init_pshared(&wq->stat_lock);
+ if (ret)
+ goto err;