GCC interpretation of C11 atomics (DR 459)
Florian Weimer
fweimer@redhat.com
Tue Feb 27 16:52:00 GMT 2018
On 02/27/2018 05:40 PM, Simon Wright wrote:
> Sorry to butt in, but - if it's ROM why would you need atomic load anyway? (of course, if it's just a constant view of the object, reason is obvious)
On many systems, the read-only nature of a memory region is a
thread-local or process-local attribute. Other parts of the system
might have a different view on the same memory region.
Some CPUs support memory protection keys, which provide a cheap way to
switch memory from read-only to read-write and back, and those switching
operations deliberately do not involve a memory barrier.
Thanks,
Florian
More information about the Gcc
mailing list