From what I've read from Herb Sutter and others you would think that volatile
and concurrent programming were completely orthogonal concepts, at least as far as C/C++ are concerned.
However, in GCC c++0x extension all of std::atomic
's member functions have the volatile
qualifier. The same is true in Anthony Williams's implementation of std::atomic
.
So what's deal, do my atomic<>
variables need be volatile
or not?