In C, is i+=1; atomic?
i+=1;
No.
The only operation guaranteed by the C language standard to be atomic is assigning or retrieving a value to/from a variable of type sig_atomic_t, defined in .
sig_atomic_t
(C99, chapter 7.14 Signal handling.)