remove unneeded unlock (pthread_cond_wait do unlock the mutex)