All Manuals > LispWorks User Guide and Reference Manual > 49 The SYSTEM Package

NextPrevUpTopContentsIndex

atomic-exchange

Macro
Summary

Atomically exchange a place value with a new value, returning the old value.

Package

system

Signature

atomic-exchange place new-value => old-value

Arguments

place

One of the specific set of places defined for low level atomic operations.

new-value

An object.

Values

old-value

An object.

Description

The macro atomic-exchange exchanges the value in place with new-value, returning the old-value. The operation is guaranteed to be atomic.

place must be one of the places described in Low level atomic operations, or expand to one of them.

See also

compare-and-swap
low-level-atomic-place-p


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex