title: Portable Compare And Swap (atomic operations) C/C++ library?
body: <p>Is there any small library, that wrapps various processors' CAS-like operations into macros or functions, that are portable across multiple compilers?</p>
  
  <p><strong>PS.</strong> The <a href="http://www.boost.org/doc/libs/1_39_0/boost/interprocess/detail/atomic.hpp" rel="noreferrer">atomic.hpp library</a> is inside boost::interprocess::detail namespace. The author refuses to make it a public, well maintained library.</p>
  
  <p><strong>Lets reopen the question, and see if there are any other options?</strong></p>