ret = pthread_mutexattr_setpshared(&attr, mflag);
if (ret) {
log_err("pthread_mutexattr_setpshared: %s\n", strerror(ret));
goto err;
}
ret = pthread_mutexattr_setpshared(&attr, mflag);
if (ret) {
log_err("pthread_mutexattr_setpshared: %s\n", strerror(ret));
goto err;
}
pthread_cond_init(&mutex->cond, &cond);
ret = pthread_mutex_init(&mutex->lock, &attr);
pthread_cond_init(&mutex->cond, &cond);
ret = pthread_mutex_init(&mutex->lock, &attr);