[cpp-threads] New strawman proposal
Doug Lea
dl at cs.oswego.edu
Thu Jun 9 00:31:13 BST 2005
Boehm, Hans wrote:
>
>>2. Leaving the semantics of anything with cycles undefined
>>might be the best we can do, but means that many programs
>>will unknowingly be ill-formed. I suppose it is possible to
>>create tools that can detect and inform programmers about
>>such constructions.
>
> Do you have an example in mind here?
>
> Actually, my intent was that a cycle generally reflects
> an infeasible synchronizes-with relation. I think we're not
> outlawing
>
> Initially x = y = 0, x and y are unordered synchronization
> variables:
>
> Thread 1 Thread 2
> x = y y = x
>
> Outcome: x = y = 42
>
What if the reads here are atomic.readAcquire
and writes were atomic.storeRelease (or whatever
we decide to call these)?
> I'd like to see a prototype of at least the interface.
> (If we had a candidate interface, I'd be interested in trying
> to implement it in terms of atomic_ops, updating that
> if necessary. That should give us a semi-portable
> prototype.)
I posted a couple of starts on this that got shot down;
I believe Peter Dimov is the last person to volunteer
to give it a shot?
-Doug
More information about the cpp-threads
mailing list