Atomically swap atomicPtr and return its previous value.
Declared in <bsls_atomicoperations_default.h>
static
void*
swapPtr(
AtomicTypes::Pointer* atomicPtr,
void* swapValue);
Atomically set the value of the specified atomicPtr to the specified swapValue, and return its previous value, providing the sequential consistency memory ordering guarantee.
previous value of atomicPtr
| Name | Description |
|---|---|
| atomicPtr | atomic pointer to modify |
| swapValue | value to store |