Re: GCC Wiki AtomySync

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

 



Hi Jonathan,
I absolutely believe that you all master this and have total knowledge of
the matter. This is just a simple oversight that happens (too work,etc.):
I've just pointed it out for beginners that might not catch immediately
that it's a typo of the text and not a willful sentence.
Gcc is great, keep up the amazing job!

On Thu, Jul 20, 2023 at 3:27 PM Jonathan Wakely <jwakely.gcc@xxxxxxxxx>
wrote:

> On Thu, 20 Jul 2023 at 08:12, m g via Gcc-help <gcc-help@xxxxxxxxxxx>
> wrote:
> >
> > To whom it may concern,
> >
> > In the example below the title  "Overall Summary" the Wiki reads
>
> Where "the Wiki" means https://gcc.gnu.org/wiki/Atomic/GCCMM/AtomicSync
>
> > "*Release/acquire
> > ... thread 3's assert can fail.There has been no synchronization between
> > threads 1 and 3, so no value can be assumed for 'x' there.*"
> >
> > Are you sure about this sentence "thread 3's assert *can* fail"?
> > Although the synchronization happens between threads 2 and 3;  x.store
> (10)
> > in thread 1 still inter-thread happens before y.store (10) in thread 2
> > therefore  if (y.load() == 10) is true in thread 3  thread 3's assert
> > *cannot* fail.
>
> The statement would be true if the loads in thread 3 were relaxed. I
> think you're right that for MO acquire in thread 3 there's a
> happens-before relation.
>
> That wiki page is over a decade old and not maintained or really of
> interest to anybody now.
>
>
> >
> > (  *5) A inter-thread happens-before some evaluation X, and X
> inter-thread
> > happens-before B* from
> https://en.cppreference.com/w/cpp/atomic/memory_order
> > )
> >
> > *Obviously* I can be wrong, let me know!
>




[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