recursive mutex?

Loren James Rittle rittle@latour.rsch.comm.mot.com
Wed Oct 17 18:39:00 GMT 2001


>> I need a recursive mutex lock, but it seems the STL/libstdc++ doesn't
>> already have one.  Or do I miss something?

> It's funny because I just came across this with Forte C++ on Solaris.  It
> seems Solaris 2.8 and 2.7 pthreads implementation have an option for
> recursive on the pthreads mutex, but Solaris 2.6 (and older I assume) does
> not.
>
> Is this system-specific?  And/or maybe something introduced in a recent
> revision of pthreads that wasn't in earlier versions?

According to the POSIX standard, the recursive mutex is an option.

The gthr.h abstraction layer, which STL/libstdc++ uses, does not offer
a recursive mutex.

Regards,
Loren



More information about the Libstdc++ mailing list