int error = pthread_mutex_lock(&mutex);