BloombergLP::bsls::AtomicUint64::testAndSwapAcqRel

Compare the value of this object to the specified compareValue. If they are equal, set the value of this atomic 64-bit unsigned integer to the specified swapValue, otherwise leave this value unchanged. Return the previous value of this atomic unsigned integer, whether or not the swap occurred. Note that the entire test-and-swap operation is performed atomically and it provides the acquire/release memory ordering guarantee.

Synopsis

Declared in <bsls_atomic.h>

Types::Uint64
testAndSwapAcqRel(
    Types::Uint64 compareValue,
    Types::Uint64 swapValue);