W3cubDocs

/GNU Fortran 7

8.2.21 _gfortran_caf_event_query — Query event count

Description:

Return the event count of the specified event variable.

Syntax:

void _gfortran_caf_event_query (caf_token_t token, size_t index, int image_index, int *count, int *stat)

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; zero indicates the current image when accessed noncoindexed.
count intent(out) The number of events currently posted to the event variable.
stat intent(out) Stores the STAT=; may be NULL.
NOTES

The typical use is to check the local event variable to only call event_wait when the data is available. However, a coindexed variable is permitted; there is no ordering or synchronization implied. It acts like an atomic fetch of the value of the event variable.

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gfortran/_005fgfortran_005fcaf_005fevent_005fquery.html