[Bug libstdc++/51296] Several 30_threads tests FAIL on Tru64 UNIX

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 13 10:54:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51296

--- Comment #25 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-13 10:37:52 UTC ---
Nice digging.  POSIX does say the INIT macro is for use when the mutex is
statically-allocated:

"In cases where default mutex attributes are appropriate, the macro
PTHREAD_MUTEX_INITIALIZER can be used to initialize mutexes that are statically
allocated."


For most platforms it works fine for automatic variables and in C++ for member
variables too.

Maybe something scans the BSS segment at startup to find mutexes?!  In any
case, it looks as though we should definitely use the init function instead of
the macro on Tru64.



More information about the Gcc-bugs mailing list