------- Comment #1 from jifl-bugzilla at jifvik dot org 2008-07-11 13:03 ------- On thinking about this a bit more, I think this would be a regression for the case where __GTHREAD_MUTEX_INIT is used. In the case of __GTHREAD_MUTEX_INIT_FUNCTION, I believe the previous implementation was also susceptible to this issue, although in practice, I don't recall ever seeing it - maybe just luck of link order.
So the __GTHREAD_MUTEX_INIT case can probably be addressed by bringing the implementation back to the way it was before. I haven't so far thought of a way to address the __GTHREAD_MUTEX_INIT_FUNCTION case other than the use of __gthread_once(). I would be tempted to provide a patch, but I don't have a copyright assignment for GCC (and of course it takes weeks to sort that out). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36801