title: Equivalent of InterlockedIncrement in Linux/gcc
body: <p>It would be a very simple question (could be duplicated), but I was unable to find it.</p>
  
  <p>Win32 API provides a very handy set of atomic operations (as intrinsics) such as <code>InterlockedIncrement</code> which emits <code>lock add</code> x86 code. Also, <code>InterlockedCompareExchange</code> is mapped to <code>lock cmpxchg</code>.</p>
  
  <p>But, I want to do that in Linux with gcc. Since I'm working 64-bit, it's impossible to use inline assembly. Are there intrinsics for gcc?</p>