Page 1 of 1

ARMV8 fundamental data type atomicity

Posted: 2021-12-10, 16:34:48
by hankin
As we know, access aligned fundamental data types in INTEL X86 architecture is atomic. How about ARMV8?
I have tried to get the result from Arm Architecture Reference Manual Armv8, for A-profile architecture, I did find something related to atomicity. ARMV8 is other-multi-copy atomic. It promises that multi-threads access one same LOCATION is atomic. But it says LOCATION is a byte. I am wondering that if thread 1 writes an aligned uint64_t memory without lock and thread 2 reads or writes it without lock at the same time. Is it atomic?(uint64_t is 8 bytes, but LOCATION is only one byte)

Re: ARMV8 fundamental data type atomicity

Posted: 2021-12-11, 6:05:42
by agner
I don't know. ARM is off-topic here.
You may post the question at stackoverflow.com

Re: ARMV8 fundamental data type atomicity

Posted: 2021-12-20, 11:36:13
by hankin
I have done some research about this topic. For aligned fundamental data type, it is atomic to access. In the document《Arm® Architecture Reference Manual Armv8, for A-profile architecture》, it is called single-copy atomic.