In C, is i+=1; atomic?
i+=1;
No, it isn't. If the value of i is not loaded to one of the registers already, it cannot be done in one single assembly instruction.