> The gthreads portability layer is missing a function for destroying a > __ghtread_recursive_mutex object. > > For pthreads-based models the recursive mutex type is the same as the > normal mutex type so __gthread_mutex_destroy handles both, but they're > distinct types for (at least) gthr-win32.h, so we can't properly > cleanup recursive mutexes in libstdc++ > > Any objections if I prepare a patch to add > __gthread_recursive_mutex_destroy to each gthr header?
It makes sense. libobjc could use these as well; all mutexes in libobjc are recursive mutexes. At the moment libobjc uses __gthread_objc_mutex_xxx and similar, but it should probably move to use __gthread_recursive_mutex_xxx. Thanks