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

Peter Dimov pdimov at mmltd.net
Fri May 6 23:52:11 BST 2005


Boehm, Hans wrote:
> The definition in the current draft has the advantages that:
>
> a) It's much simpler since we don't need to explicitly define
> the "happens-before" relation.  (It's also quite possibly too
> simple once we add atomic operations.  But a really simple rule
> for the majority of programmers who will hopefully only use
> locks would be nice.)

A memory model that requires fully-fenced (even on failure) synchronization 
primitives and fully-fenced atomic operations... is not a good idea. :-) 





More information about the cpp-threads mailing list