Library /sys$common/syshlp/HELPLIB.HLB  —  CC  Language topics, Builtin Functions,  CMP SWAP QUAD ACQ
  Performs a conditional atomic compare and exchange operation with
  acquire semantics on a quadword.  The quadword pointed to by source
  is read and compared with the quadword old_value.  If they are
  equal, the quadword new_value is written into the quadword pointed
  to by source.  The read and write is performed atomically, with no
  intervening access to the same memory region.

  Acquire memory ordering guarantees that the memory read/write is
  made visible before all subsequent memory data accesses to the same
  memory location by other processors.

  The function returns 1 if the write occurs, and 0 otherwise.

  Syntax:

       int __CMP_SWAP_QUAD_ACQ (volatile void *source, int old_value,
       int new_value);
Close Help