mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-03 20:29:21 +02:00
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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user