Peter Dimov wrote:
[...]
> Double calls to pthread_mutex_lock are the equivalent of doing
> 
> scoped_lock l1(m);
> scoped_lock l2(m);
> 
> This is already undefined behavior when m is boost::mutex according to the
> mutex requirements; m is not required to check for deadlocks. 

Okay.

> We are discussing the
> 
> scoped_lock l1(m);
> l1.lock();
> 
> case. Since l1 is required to know whether it's been locked or not (it has a
> public locked() query) it can easily check.

What for? http://www.terekhov.de/DESIGN-futex-CV.cpp (see 
mutex::guard and mutex::release_guard). I guess that I'm just
missing and/or misunderstanding something... oder?

regards,
alexander.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to