Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #6795

Re: Threading question - read-read coherency almost, sort of, with seq_cst fences

From Anthony Williams <anthony.ajw@gmail.com>
Newsgroups comp.lang.c++
Subject Re: Threading question - read-read coherency almost, sort of, with seq_cst fences
References <c4891256-0c18-4eab-a227-ba819263d133@v11g2000prk.googlegroups.com> <fgiKp.1272$tp.587@newsfe06.iad> <SsiKp.6118$PA5.2503@newsfe01.iad> <a40e2f28-5513-496a-aa0d-4be6cc58c0ac@s41g2000prb.googlegroups.com>
Date 2011-06-16 11:45 +0100
Message-ID <87y612dpgs.fsf@justsoftwaresolutions.co.uk> (permalink)
Organization CNNTP

Show all headers | View raw


Joshua Maurice <joshuamaurice@gmail.com> writes:

> On Jun 16, 12:41 am, "Chris M. Thomasson" <cris...@charter.net> wrote:
>> "Chris M. Thomasson" <cris...@charter.net> wrote in messagenews:fgiKp.1272$tp.587@newsfe06.iad...
>> Relacy Race Detector is NOT reporting that is condition is possible!
>>
>> Fixed code:
>>
>> http://pastebin.com/tE1TX1sx

> When you say "Relacy Race Detector is NOT reporting that is condition
> is possible!", that means that it reports that the end condition is
> not possible, right? Perhaps semantic quibbling, but I want to be
> sure.

When I ran Chris's code through relacy, the assert  on r1==0 && r2==1 &&
r3 ==0 did not fire, even with the full search scheduler => this state
did not occur.

> However, we seem to have a problem then. Anthony else-thread has
> stated that his notes seem to indicate that C++0x 29.3/7 does not
> apply, and I assume - please correct me here if need be - that neither
> of us knows of another rule that would disallow the following end
> conditions:
>     r1 == 0 && r2 == 1 && r3 == 0
>
> Thus, we have a problem. Anthony and my understanding, and Relacy Race
> Detector, cannot be both right here. Either that end condition is
> possible from an allowed execution according to the C++0x spec, or
> it's not. I suppose alternatively that there's a bug or ambiguity in
> the standard, and in which case we would need to identify that and fix
> that defect in the standard.

I think there is a bug in relacy.

Anthony
-- 
Author of C++ Concurrency in Action     http://www.stdthread.co.uk/book/
just::thread C++0x thread library             http://www.stdthread.co.uk
Just Software Solutions Ltd       http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Threading question - read-read coherency almost, sort of, with seq_cst fences Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-15 16:56 -0700
  Re: Threading question - read-read coherency almost, sort of, with seq_cst fences "Chris M. Thomasson" <cristom@charter.net> - 2011-06-16 00:28 -0700
    Re: Threading question - read-read coherency almost, sort of, with seq_cst fences "Chris M. Thomasson" <cristom@charter.net> - 2011-06-16 00:41 -0700
      Re: Threading question - read-read coherency almost, sort of, with seq_cst fences Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-16 02:47 -0700
        Re: Threading question - read-read coherency almost, sort of, with seq_cst fences Anthony Williams <anthony.ajw@gmail.com> - 2011-06-16 11:45 +0100
          Re: Threading question - read-read coherency almost, sort of, with seq_cst fences "Chris M. Thomasson" <cristom@charter.net> - 2011-06-16 14:32 -0700
  Re: Threading question - read-read coherency almost, sort of, with seq_cst fences Anthony Williams <anthony.ajw@gmail.com> - 2011-06-16 09:42 +0100
    Re: Threading question - read-read coherency almost, sort of, with seq_cst fences Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-16 02:50 -0700
      Re: Threading question - read-read coherency almost, sort of, with seq_cst fences Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-16 02:53 -0700

csiph-web