diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 2001-01-30 14:16:56 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 2001-01-30 14:16:56 +0000 |
commit | f9dfcb27b7ba635212711a1f9d22fe8282813732 (patch) | |
tree | 08124a1dc0677c280e3fee464dbc52c229da70d4 /gthread | |
parent | 1f46d9f68f5b98262c07c2e4e15771655aad84db (diff) |
Call g_thread_impl_init(), as g_thread_init won't call it.
2001-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* 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.
Diffstat (limited to 'gthread')
-rw-r--r-- | gthread/ChangeLog | 3 | ||||
-rw-r--r-- | gthread/gthread-impl.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gthread/ChangeLog b/gthread/ChangeLog index d6878da44..48ecf7338 100644 --- a/gthread/ChangeLog +++ b/gthread/ChangeLog @@ -1,5 +1,8 @@ 2001-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + * gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call + g_thread_impl_init(), as g_thread_init won't call it. + * gthread-impl.c (g_mutex_free_errorcheck_impl): Fixed it for real. Sorry for this mess. It looked like a real obvious fix, so I didn't check. Bad boy. Added some casts to quiet the compiler. 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); } |