The GNU Fortran Compiler: _gfortran_caf_sync_memory

Next: _gfortran_caf_error_stop, Previous: _gfortran_caf_sync_images, Up: Function ABI Documentation [Contents][Index]

#### 8.2.17 `_gfortran_caf_sync_memory` — Wait for completion of segment-memory operations

Description:

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

Syntax:

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

Arguments:

  stat | intent(out) Stores the status STAT= and may be NULL.
  errmsg | intent(out) When an error occurs, this will be set to an error message; may be NULL
  errmsg_len | the buffer size of errmsg.

NOTE A simple implementation could be

  `__asm__ __volatile__ ("":::"memory")` to prevent code movements.