replace new pthread_mutex_t