title: Is volatile int in C as good as std::atomic<int> of C++0x?
body: <p>I need to have atomic variables in my program. Previously I was using <code>std::atomic&lt;int&gt;</code>, but the platform in which I'm working now does not have a g++ compiler that supports C++0x. I used <code>volatile int</code> and it seems to be working, as I haven't experienced a race condition yet in the multicore system I'm testing it on. </p>
  
  <p>My question is if <code>volatile int</code> is <strong>atomic</strong> like <code>std::atomic&lt;int&gt;</code>? Also, does it creates memory barriers (which I also require)?</p>