]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgomp/doc/openmp-runtime-library-routines/ompsetnestlock.rst
c159d9560a651ba93bbdb606c1612614391c8e5f
[thirdparty/gcc.git] / libgomp / doc / openmp-runtime-library-routines / ompsetnestlock.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _omp_set_nest_lock:
7
8 omp_set_nest_lock -- Wait for and set nested lock
9 *************************************************
10
11 Description:
12 Before setting a nested lock, the lock variable must be initialized by
13 ``omp_init_nest_lock``. The calling thread is blocked until the lock
14 is available. If the lock is already held by the current thread, the
15 nesting count for the lock is incremented.
16
17 C/C++:
18 .. list-table::
19
20 * - *Prototype*:
21 - ``void omp_set_nest_lock(omp_nest_lock_t *lock);``
22
23 Fortran:
24 .. list-table::
25
26 * - *Interface*:
27 - ``subroutine omp_set_nest_lock(nvar)``
28 * -
29 - ``integer(omp_nest_lock_kind), intent(inout) :: nvar``
30
31 See also:
32 :ref:`omp_init_nest_lock`, :ref:`omp_unset_nest_lock`
33
34 Reference:
35 :openmp:`4.5`, Section 3.3.4.