From f9dfcb27b7ba635212711a1f9d22fe8282813732 Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Tue, 30 Jan 2001 14:16:56 +0000 Subject: Call g_thread_impl_init(), as g_thread_init won't call it. 2001-01-30 Sebastian Wilhelmi * gthread/gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call g_thread_impl_init(), as g_thread_init won't call it. * glib/glib-sections.txt, glib/tmpl/threads.sgml: Added g_static_mutex_free * gthread.c, gthread.h: Added g_static_mutex_free to allow using GStaticMutexes with limited lifetime without leaking. * configure.in: GStaticMutex doesn't have to provide extra space for debugging information for G_ERRORCHECK_MUTEXES, as then the non-default implementation (runtime_mutex) is used anyway. --- gthread/gthread-impl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gthread/gthread-impl.c') diff --git a/gthread/gthread-impl.c b/gthread/gthread-impl.c index 8e5e69adc..6d194994a 100644 --- a/gthread/gthread-impl.c +++ b/gthread/gthread-impl.c @@ -290,6 +290,12 @@ g_thread_init_with_errorcheck_mutexes (GThreadFunctions* init) (gboolean (*)(GCond *, GMutex *, GTimeVal *)) g_cond_timed_wait_errorcheck_impl; +#ifdef HAVE_G_THREAD_IMPL_INIT + /* This isn't called in g_thread_init, as it doesn't think to get + * the default implementation, so we have to call it on our own. */ + g_thread_impl_init(); +#endif + g_thread_init (&errorcheck_functions); } -- cgit v1.2.1