ARM:从 int 写入/读取是原子的吗? [英] ARM: Is writing/reading from int atomic?
本文介绍了ARM:从 int 写入/读取是原子的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 ARM 架构上,不幸的是我不知道它到底是什么芯片,是 32 位 int 读/写原子吗?
On ARM architecture, unfortunately I don't know exactly what chip it is, is a 32 bit int read/write atomic?
对基本类型的读/写是否有任何保证?
Is there any sort of guarantees about reads/writes to basic types?
推荐答案
它应该是原子的,除非该 int 存储在未对齐的地址上.
It should be atomic, EXCEPT if that int is stored on a non-aligned address.
这篇关于ARM:从 int 写入/读取是原子的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文