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

Jason Merrill
Mon Aug 30 19:11:00 GMT 2004

On Mon, 30 Aug 2004 11:43:49 -0700, Jason Thorpe <> wrote:

> 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.

Yep, that's what the portable fallback does.


More information about the Gcc-patches mailing list