What is the best cross platform library to use for atomic compare and swap operations in c++?
...Or at least for amd64 on Linux and Windows?
What is the best cross platform library to use for atomic compare and swap operations in c++?
...Or at least for amd64 on Linux and Windows?
It depends on the compiler compatibility you need.
If you are using GCC on both platforms, you can just use GCC's atomic primitives, as they are tied to the hardware architecture, not the OS platform.
Otherwise, as PeterK suggested, look at Boost. There is a Boost.Atomic candidate library; I don't know what its status on being incorporated is.