This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC interpretation of C11 atomics (DR 459)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]