Next: , Previous: omp_init_lock, Up: Runtime Library Routines


2.21 omp_set_lock – Wait for and set simple lock

Description:
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.
C/C++:

Prototype: void omp_set_lock(omp_lock_t *lock);

Fortran:

Interface: subroutine omp_set_lock(lock)
integer(omp_lock_kind), intent(inout) :: lock

See also:
omp_init_lock, omp_test_lock, omp_unset_lock
Reference:
OpenMP specifications v3.0, section 3.3.3.