On 05/17/2016 01:01 PM, Sergey Fedorov wrote:
>> Sorry, I can't see reading ARMv6 ARM that 1-byte access can't be atomic. What
>> I've found:
>>
>>     B2.4.1 Normal memory attribute
>>     (snip)
>>     Shared Normal memory
>>
>>         (snip)
>>         ... Reads to Shared Normal Memory that are aligned in memory to the
>>         size of the access must be atomic.
...
> Looks like GCC has no trouble generating __atomic_store_n() for 1-byte bool...

Not loads and stores, but other atomic ops like xchg.  The native atomic
operations are all 4 bytes long.

I suppose the compiler may well be able to synthesize sub-word atomic ops, but
it'll be 2 or 3 times the size of a word-sized atomic op, and for no good 
reason.


r~

Reply via email to