is reading/writing an integer (4 bytes) atomic on ios/android like on win32/win64?

▼魔方 西西 提交于 2019-12-25 01:14:43

问题


On windows, if align is set to 4 bytes (this is by default in project option) then reading/writing to an integer is atomic. Is it the same on ios/android ?

if not atomic, can i have an exception or a misc error (other than obtening the wrong value) if 2 threads read and write at the same time the same integer value ?

来源:https://stackoverflow.com/questions/39987850/is-reading-writing-an-integer-4-bytes-atomic-on-ios-android-like-on-win32-win6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!