omp_set_lock– Wait for and set simple lock
Before setting a simple lock, the lock variable must be initialized by
omp_init_lock. The calling thread is blocked until the lock
is available. If the lock is already held by the current thread,
a deadlock occurs.
omp_init_lock, omp_test_lock, omp_unset_lock
OpenMP specification v4.5, Section 3.3.4.