The pthread library has a function pthread_mutex_lock which is used for locking purposes. I tried doing man pthread_mutex_lock but it didn\'t show
pthread_mutex_lock
man pthread_mutex_lock