Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.
Next: Inlined Mathematical Instructions, Previous: Inlined Scheme Instructions, Up: Instruction Set [Contents][Index]
See Atomics, for more on atomic operations in Guile.
Create a new atomic box initialized to src, and place it in dst.
Fetch the value of the atomic box at box into dst.
Set the contents of the atomic box at box to val.
Replace the contents of the atomic box at box to val and store the previous value at dst.
If the value of the atomic box at box is the same as the SCM value
at expected (in the sense of eq?
), replace the contents of
the box with the SCM value at desired. Otherwise does not update
the box. Set dst to the previous value of the box in either case.