]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/doc/openmp-runtime-library-routines/ompsetlock.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / libgomp / doc / openmp-runtime-library-routines / ompsetlock.rst
CommitLineData
c63539ff
ML
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_lock:
7
8omp_set_lock -- Wait for and set simple lock
9********************************************
10
11Description:
12 Before setting a simple lock, the lock variable must be initialized by
13 ``omp_init_lock``. The calling thread is blocked until the lock
14 is available. If the lock is already held by the current thread,
15 a deadlock occurs.
16
17C/C++:
18 .. list-table::
19
20 * - *Prototype*:
21 - ``void omp_set_lock(omp_lock_t *lock);``
22
23Fortran:
24 .. list-table::
25
26 * - *Interface*:
27 - ``subroutine omp_set_lock(svar)``
28 * -
29 - ``integer(omp_lock_kind), intent(inout) :: svar``
30
31See also:
32 :ref:`omp_init_lock`, :ref:`omp_test_lock`, :ref:`omp_unset_lock`
33
34Reference:
3ed1b4ce 35 :openmp:`4.5`, Section 3.3.4.