title: Which integer operations are atomic on the ios/arm platform?
body: <p>If I have an integer x, which of the following statements are atomic on the ARM architecture on an iPhone?</p>
  
  <pre><code>int x;
  int y;
  x = 92;  // . . . . . .   A
  x++;     // . . . . . .   B
  y = ++x; // . . . . . .   C
  printf("x = %d\n", x); // D
  </code></pre>
  
  <p>I know, that on the i386 platform, statements A, B and D are atomic, while C is not. I'm pretty sure that C is not atomic in iOS. I suspect that basic load and store operations (D and A) are atomic in iOS too, but I'm not sure. Does anyone know more?</p>
  
  <p>How is it with 16 bit and 8 bit values? Or with 64 bit values on the iPhone 5S and with 64 bit values on the iPhone 5 and below?</p>
  
  <p>(If the answer is as I suspect... Is there any platform where basic load and store operations are not atomic?)</p>