------- Comment #28 from jvdelisle at gcc dot gnu dot org 2008-02-08 16:33 ------- pthread_mutex_destroy() fixes the problem on Cygwin including the case in Comment #26. It regression tests OK on Linux-x86-64. I am now just reviewing to make sure we don't try to lock after a destroy, which can lead to undefined behavior.
I will submit the patch here first since it will need to be tested on mingw. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35063