AtomicSwap instead of AtomicCompareAndSwap ?
Posted
by anon
on Stack Overflow
See other posts from Stack Overflow
or by anon
Published on 2010-03-12T23:27:35Z
Indexed on
2010/03/12
23:47 UTC
Read the original article
Hit count: 276
atomic-compare-and-swap
|atomic-swap
I know that on MacOSX / PosiX systems, there is atomic-compare-and-swap for C/C++ code via g++.
However, I don't need the compare -- I just want to atomically swap two values. Is there an atomic swap operation available? [Everythign I can find is atomic_compare_and_swap ... and I just want to do the swap, without comparing].
Thanks!
© Stack Overflow or respective owner