Deprecate g_thread_init()

Move the last few things that needed thread-safe initialisation to a
global ctor.

https://bugzilla.gnome.org/show_bug.cgi?id=660744
This commit is contained in:
Ryan Lortie
2011-10-04 15:30:39 -04:00
parent 310c3ed4cc
commit 47444dacc0
19 changed files with 353 additions and 351 deletions

View File

@@ -33,28 +33,15 @@
#include "glib.h"
#include "gthreadprivate.h"
void
g_thread_init (gpointer init)
{
static gboolean already_done;
if (init != NULL)
g_warning ("GThread system no longer supports custom thread implementations.");
if (already_done)
return;
already_done = TRUE;
g_thread_init_glib ();
}
void
g_thread_init_with_errorcheck_mutexes (gpointer vtable)
{
g_assert (vtable == NULL);
g_thread_init (NULL);
}