In C is “i+=1;” atomic?

后端 未结 12 2094
天命终不由人
天命终不由人 2020-12-28 12:58

In C, is i+=1; atomic?

12条回答
  •  伪装坚强ぢ
    2020-12-28 13:51

    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.

提交回复
热议问题