title: Interlocked equivalent on Linux
body: <p>In a C++ Linux app, what is the simplest way to get the functionality that the <a href="http://msdn.microsoft.com/en-us/library/system.threading.interlocked.aspx" rel="noreferrer">Interlocked</a> functions on Win32 provide?  Specifically, a lightweight way to atomically increment or add 32 or 64 bit integers?  </p>