UNLOCK statement
Standard: F77 F90 F95 F2003 F2008 Example program
<Syntax>
UNLOCK ( lock-variable [ , sync-stat ]... )
sync-stat-list ::= sync-stat [ , sync-stat ]
sync-stat ::= STAT = stat-variable | ERRMSG = errmsg-variable
The lock-variable must be a scalar variable of type LOCK_TYPE
from the intrinsic module ISO_FORTRAN_ENV.
The errmsg-variable must be a scalar Character variable with default kind, and the stat-variable must be a scalar Integer variable; these are further described in the STAT= and ERRMSG= specifier pages.
<Semantics>
This statement unlocks a lock variable that is currently locked by the executing image.
If the lock is already unlocked, an error occurs: the stat-variable will be assigned the value of STAT_UNLOCKED
from the intrinsic module ISO_FORTRAN_ENV.
If the lock is locked by another image, an error occurs: the stat-variable will be assigned the value of STAT_LOCKED_OTHER_IMAGE
from the intrinsic module ISO_FORTRAN_ENV.
Note that if any error occurs and STAT= does not appear, the program will be terminated.
<Related>
ERRMSG= specifier, LOCK statement, LOCK_TYPE from ISO_FORTRAN_ENV, STAT= specifier