8.2.22. _gfortran_caf_atomic_cas

8.2.22 _gfortran_caf_atomic_cas — Atomic compare and swap

Description:
Atomic compare and swap of a kind-4 integer or logical variable. Assigns atomically the specified value to the atomic variable, if the latter has the value specified by the passed condition value.
Syntax:
void _gfortran_caf_atomic_cas (caf_token_t token, size_t offset, int image_index, void *old, void *compare, void *new_val, int *stat, int type, int kind)
Arguments:
token intent(in) An opaque pointer identifying the coarray.
offset By which amount of bytes the actual data is shifted compared to the base address of the coarray.
image_index The ID of the remote image; must be a positive number; zero indicates the current image when used noncoindexed.
old intent(out) the value which the atomic variable had just before the cas operation.
compare intent(in) The value used for comparision.
new_val intent(in) The new value for the atomic variable, assigned to the atomic variable, if compare equals the value of the atomic variable.
stat intent(out) Stores the status STAT= and may be NULL.
type the data type, i.e. BT_INTEGER (1) or BT_LOGICAL (2).
kind The kind value (only 4; always int)

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部