]>
Commit | Line | Data |
---|---|---|
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_unset_lock: | |
7 | ||
8 | omp_unset_lock -- Unset simple lock | |
9 | *********************************** | |
10 | ||
11 | Description: | |
12 | A simple lock about to be unset must have been locked by ``omp_set_lock`` | |
13 | or ``omp_test_lock`` before. In addition, the lock must be held by the | |
14 | thread calling ``omp_unset_lock``. Then, the lock becomes unlocked. If one | |
15 | or more threads attempted to set the lock before, one of them is chosen to, | |
16 | again, set the lock to itself. | |
17 | ||
18 | C/C++: | |
19 | .. list-table:: | |
20 | ||
21 | * - *Prototype*: | |
22 | - ``void omp_unset_lock(omp_lock_t *lock);`` | |
23 | ||
24 | Fortran: | |
25 | .. list-table:: | |
26 | ||
27 | * - *Interface*: | |
28 | - ``subroutine omp_unset_lock(svar)`` | |
29 | * - | |
30 | - ``integer(omp_lock_kind), intent(inout) :: svar`` | |
31 | ||
32 | See also: | |
33 | :ref:`omp_set_lock`, :ref:`omp_test_lock` | |
34 | ||
35 | Reference: | |
36 | :openmp:`4.5`, Section 3.3.5. |