g_thread_functions_for_glib_use.thread_self (&self);
if (g_system_thread_equal (info->owner, self))
- g_error ("Trying to recursivly lock a mutex at '%s', "
+ g_error ("Trying to recursively lock a mutex at '%s', "
"previously locked at '%s'",
loc, info->location);
gboolean supported;
if (thread_system_already_initialized)
- g_error ("GThread system may only be initialized once.");
+ {
+ if (init != NULL)
+ g_warning ("GThread system already initialized, ignoring custom thread implementation.");
+
+ return;
+ }
thread_system_already_initialized = TRUE;
g_thread_use_default_impl = FALSE;
g_thread_functions_for_glib_use = *init;
+ if (g_thread_gettime_impl)
+ g_thread_gettime = g_thread_gettime_impl;
supported = (init->mutex_new &&
init->mutex_lock &&
init->thread_join &&
init->thread_exit &&
init->thread_set_priority &&
- init->thread_self &&
- init->gettime);
+ init->thread_self);
/* if somebody is calling g_thread_init (), it means that he wants to
* have thread support, so check this
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 */