[PATCH] Threadsafe locale initialization

Loren James Rittle rittle@latour.rsch.comm.mot.com
Thu Oct 2 20:33:00 GMT 2003


In article <07D05A69A3D0C14FAEA60C3ACE8E5564028F55D9@mail.ru.is>,
Pétur Runólfsson<peturr02@ru.is> writes:

> So it seems that __gthread_active_p() can return 0 under some
> conditions (although I'm not quite sure which). 

It can return 0 whenever the system supports weak symbols (ala ELF),
the program/library was compiled to support threads yet the thread
library was not in fact linked into the final image.

> I agree, except that __gthread_mutex_[un]lock must be wrapped in
> an exception safe lock class.

This is a good observation...



More information about the Libstdc++ mailing list