Re: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 not defined on aarch64

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

 



On 28/06/17 18:36, Richard Earnshaw wrote:
> thread2 is blissfully unaware of the fact that by using CAS directly on
> 'a' it has broken the requirement in f() that an object must be locked
> before it can be dereferenced.

I don't undestand, though; wouldn't this be something which falls wholly
to the *user* to get right?  why is the compiler concerned?

If I create a variable which I make thread safe with locks and then in
one case I don't use those locks, this is my problem, not the compilers.

This matter with CAS/locks seems much the same.





[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