http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49484
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26363|0 |1 is obsolete| | --- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-18 13:26:01 UTC --- Created attachment 26364 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26364 more complete patch Changes __GTHREAD_MUTEX_INIT_FUNCTION to be unconditionally available (but not for all configs). Still shows an issue when __GTHREAD_MUTEX_INIT is not available in the fork () path. While we can re-init the mutex there with __GTHREAD_MUTEX_INIT_FUNCTION, the non-__GTHREAD_MUTEX_INIT path will later use a broken once in init_mx_once (and of course initialize it again). Unless it is somehow guaranteed that already triggered gthread-once things will work fine after forking. Otherwise seems to work fine on x86_64-linux sofar.