ATOMIC_FETCH_XOR intrinsic subroutine

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


<Syntax>

CALL ATOMIC_FETCH_XOR(ATOM, VALUE, OLD [ , STAT ] )

ATOM : scalar Integer(atomic_int_kind), Intent(InOut), must be a coarray or a coindexed object;
VALUE : scalar Integer;
OLD : scalar Integer(atomic_int_kind), Intent(Out);
STAT : scalar Integer, not a coindexed object, Intent(Out). STAT must be able to represent the values −9999 to +9999 (i.e. 16 bits or larger).

<Semantics>

The variable ATOM is atomically assigned the value of IEOR(ATOM,INT(VALUE,atomic_int_kind)), without regard to the segment rules, and OLD is assigned the value that ATOM had immediately before the operation. If STAT is present, it is assigned a positive value if an error occurs, and zero otherwise. If an error occurs and STAT is not present, the program is terminated.

Note that VALUE is not required to have the same kind as ATOM; however, the value of VALUE must be representable in atomic_int_kind.

If ATOM is a coindexed variable that lies on a failed image, the error STAT_FAILED_IMAGE occurs.

<Related>

ATOMIC_CAS intrinsic subroutine, ATOMIC_DEFINE intrinsic subroutine, ATOMIC_FETCH_ADD intrinsic subroutine, ATOMIC_FETCH_AND intrinsic subroutine, ATOMIC_FETCH_OR intrinsic subroutine, ATOMIC_REF intrinsic subroutine, ATOMIC_XOR intrinsic subroutine, CODIMENSION attribute, Image selectors