[cpp-threads] Does pthread_mutex_lock() have release emantics?

Peter Dimov pdimov at mmltd.net
Fri May 6 22:05:44 BST 2005


Boehm, Hans wrote:
> If we want to make it possible to prohibit this, I think we need
> to move to a different, more complicated, definition of a data
> race, which explicitly talks about a happens-before relation,
> as in the Java case.  We probably need to do that anyway if we want
> to precisely define the different ordering constraints in the
> atomic operations library.  If we think synchronization primitives
> should behave as though nothing were reordered around them, then we
> might try to preserve the current simpler definition for the
> core of the language, and confine the added complexity to the
> atomic operations library.
>
> Opinions?

Can someone please explain what do we gain by not using the JMM as is (with 
data races left undefined)? 





More information about the cpp-threads mailing list