7.2.25 _gfortran_caf_sync_memory — Wait for completion of segment-memory operations

Synopsis:

void _gfortran_caf_sync_memory (int *stat, char *errmsg, size_t errmsg_len)

Description:

Acts as optimization barrier between different segments. It also ensures that all pending memory operations of this image have been completed.

Arguments:
statintent(out) Stores the status STAT= and may be NULL.
errmsgintent(out) When an error occurs, this is set to an error message; may be NULL.
errmsg_lenintent(in) the buffer size of errmsg
Notes:

A simple implementation could be __asm__ __volatile__ ("":::"memory") to prevent code movements.