Re: Memory model release/acquire mode interactions of relaxed atomic operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4 May 2017 at 10:24, Toebs Douglass wrote:
> Atomic in this context, I believe, actually only really means the
> absence of word-tearing; you won't write half your int and then get
> swapped out and then write the other half later.

No, "atomic" in the C++ memory model has a specific meaning, more than
just guaranteeing no word-tearing. Even on a CPU architecture where
word-tearing is impossible, the use of atomic operations rather than
non-atomic ones gives information to the compiler that affects the
semantics.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux