[cpp-threads] Visibility question

Peter Dimov pdimov at mmltd.net
Wed Aug 2 13:32:18 BST 2006


Boehm, Hans wrote:
> We agree that there is clearly no race in the fence() case.
>
> But I think that's a fundamentally different question, since in my
> view fence() itself introduces synchronization edges between
> consecutively executed (in some total order) fence() operations.  I
> think it has to. Otherwise consider: [...]

> The fetch_add operations on the other hand operate on distinct
> locations, and hence introduce no inter-thread happens-before edge.

Do you know of an architecture/platform where <ordered> atomics aren't 
(going to be) fences?

> Nonetheless, I'll take this as a vote against calling this a race?

Not yet. :-) 




More information about the cpp-threads mailing list