[#BloombergLP-bsls-AtomicInt64-testAndSwapAcqRel] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/AtomicInt64.adoc[AtomicInt64]::testAndSwapAcqRel :relfileprefix: ../../../ :mrdocs: Compare the value of this object to the specified `compareValue`. If they are equal, set the value of this atomic integer to the specified `swapValue`, otherwise leave this value unchanged. Return the previous value of this atomic 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bsls/Types/Int64.adoc[Types::Int64] testAndSwapAcqRel( xref:BloombergLP/bsls/Types/Int64.adoc[Types::Int64] compareValue, xref:BloombergLP/bsls/Types/Int64.adoc[Types::Int64] swapValue); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#