omp_set_lock

void omp_set_lock(omp_lock_t *lock)
Blocks the thread executing the function until the specified lock is available and then sets the lock. A simple lock is available if it is unlocked. A nestable lock is available if it is unlocked or if it is already owned by the thread executing the function.


OpenMP API Index