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.