Atomically exchange a place value with a new value, returning the old value.
system
atomic-exchange place new-value => old-value
place
One of the specific set of places defined for low level atomic operations.
new-value
An object.
old-value
The macro atomic-exchange exchanges the value in place with new-value , returning the old-value . The operation is guaranteed to be atomic.
atomic-exchange
place must be one of the places described in Low level atomic operations, or expand to one of them.
compare-and-swap low-level-atomic-place-p