In C, is i+=1; atomic?
i+=1;
It really depends on your target and the mnemonic set of your uC/processor. If i is a variable held in a register then it is possible to have it atomic.