re-add mutex_unlock after pthread_cond_wait,