Reinstate: Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().