Next: , Previous: , Up: OpenMP Runtime Library Routines   [Contents][Index]

3.38 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.

Prototype:void omp_set_lock(omp_lock_t *lock);
Interface:subroutine omp_set_lock(svar)
integer(omp_lock_kind), intent(inout) :: svar
See also:

omp_init_lock – Initialize simple lock, omp_test_lock – Test and set simple lock if available, omp_unset_lock – Unset simple lock


OpenMP specification v4.5, Section 3.3.4.