Make threads mandatory

G_THREADS_ENABLED still exists, but is always defined. It is still
possible to use libglib without threads, but gobject (and everything
above it) is now guaranteed to be using threads (as, in fact, it was
before, since it was accidentally impossible to compile with
--disable-threads).

https://bugzilla.gnome.org/show_bug.cgi?id=616754
This commit is contained in:
Dan Winship
2011-08-31 14:01:45 -04:00
committed by Ryan Lortie
parent 0d1a2eb4bf
commit 5bc7729d16
13 changed files with 244 additions and 399 deletions

View File

@@ -36,8 +36,6 @@
#include "glib.h"
#include "gthreadprivate.h"
#ifdef G_THREADS_ENABLED
static GSystemThread zero_thread; /* This is initialized to all zero */
static gboolean thread_system_already_initialized = FALSE;
static gint g_thread_priority_map [G_THREAD_PRIORITY_URGENT + 1];
@@ -359,19 +357,3 @@ g_thread_init (GThreadFunctions* init)
g_thread_init_glib ();
}
#else /* !G_THREADS_ENABLED */
void
g_thread_init (GThreadFunctions* init)
{
g_error ("GLib thread support is disabled.");
}
void
g_thread_init_with_errorcheck_mutexes (GThreadFunctions* init)
{
g_error ("GLib thread support is disabled.");
}
#endif /* !G_THREADS_ENABLED */