_gfortran_caf_unlock (The GNU Fortran Compiler)

#### 7.2.19 `_gfortran_caf_lock` — Unlocking a lock variable ¶

Synopsis:

  `void _gfortran_caf_unlock (caf_token_t token, size_t index, int image_index, int *stat, char *errmsg, size_t errmsg_len)`

Description:

  Release a lock on the given image on a scalar locking variable or for the given array element for an array-valued variable. Unlocking a lock variable that is unlocked or has been locked by a different image is an error.

Arguments:

  token | intent(in) An opaque pointer identifying the coarray.
  index | intent(in) Array index; first array index is 0. For scalars, it is always 0.
  image_index | intent(in) The ID of the remote image; must be a positive number.
  stat | intent(out) For allocatable coarrays, stores the STAT=; may be NULL.
  errmsg | intent(out) When an error occurs, this is set to an error message; may be NULL.
  errmsg_len | intent(in) the buffer size of errmsg

Notes:

  This function is also called for critical block; for those, the array index is always zero and the image index is one. Libraries are permitted to use other images for critical-block locking variables.