[cpp-threads] Somewhat relevant technical report

Hans Boehm Hans.Boehm at hp.com
Sun Dec 18 05:00:35 GMT 2005


Where does the standard say that such locks can be removed?

It states that pthread_mutex_lock() synchronizes memory unless it fails.
It doesn't fail here.  That implies it still has the synchronization
semantics even if it's otherwise redundant.

I agree that we may want to make locks acquired by only a single thread
removable, as they now are in Java.  But I think that currently they
cannot.

As Peter points out in a later message, this soesn;t profoundly affect the
argument in the paper anyway, but ...

Hans

On Sat, 17 Dec 2005, Alexander Terekhov wrote:

> On 12/17/05, Peter Dimov <pdimov at mmltd.net> wrote:
> [...]
> > I agree that the lock/unlock pair prevents this transformation.
>
> Nope. A dummy lock can be removed entirely.
>
> regards,
> alexander.
>
> --
> cpp-threads mailing list
> cpp-threads at decadentplace.org.uk
> http://www.decadentplace.org.uk/cgi-bin/mailman/listinfo/cpp-threads
>



More information about the cpp-threads mailing list