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

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

In C, is i+=1; atomic?

12条回答
  •  清歌不尽
    2020-12-28 13:29

    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.

提交回复
热议问题