Use wrapped mutex_t/condvar_t instead of pthread_mutex/cond_t