Make thread calls unconditional if G_THREADS_MANDATORY is set

Since gobject now initialized threads unconditionally if threads are
available it makes no sense to have each thread operation
conditionally check if threads are enables, so allow this to be avoided.

https://bugzilla.gnome.org/show_bug.cgi?id=606775
This commit is contained in:
Alexander Larsson 2010-01-12 21:26:52 +01:00
parent fa2bced1f3
commit de5c708e0b

View File

@ -198,7 +198,11 @@ GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex);
(cond, mutex, abs_time, G_MUTEX_DEBUG_MAGIC, G_STRLOC) : TRUE)
#endif /* G_ERRORCHECK_MUTEXES */
#if defined(G_THREADS_ENABLED) && defined(G_THREADS_MANDATORY)
#define g_thread_supported() 1
#else
#define g_thread_supported() (g_threads_got_initialized)
#endif
#define g_mutex_new() G_THREAD_UF (mutex_new, ())
#define g_cond_new() G_THREAD_UF (cond_new, ())
#define g_cond_signal(cond) G_THREAD_CF (cond_signal, (void)0, (cond))