Applied: PATCH for thread-safe C++ static local initialization

Jason Thorpe thorpej@wasabisystems.com
Mon Aug 30 19:03:00 GMT 2004


On Aug 30, 2004, at 10:07 AM, Richard Earnshaw wrote:

>> BTW, does the NetBSD pthreads package not support static 
>> initialization of
>> recursive mutexes?  The code that references those routines is the 
>> portable
>> fallback for targets that don't, but I'd like to use static 
>> initialization
>> wherever possible.
>
> No idea.  Jason, do you know?

No, to initialize a mutex as recursive, you must pthread_mutex_init() 
with a mutexattr that has been settype'd to PTHREAD_MUTEX_RECURSIVE.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040830/db777384/attachment.sig>


More information about the Gcc-patches mailing list