GNOME Bugzilla – Bug 607481
Should define G_THREADS_MANDATORY everywhere
Last modified: 2010-01-20 08:52:27 UTC
Hi, in GLib HEAD there are optimizations now for all the thread functions if G_THREADS_MANDATORY is set. In this case all the mutex, etc calls won't check if threading support is available. I'd propose to define it at the top of gst.h but maybe another place is better because not everything includes gst.h (most notably gstreamer/gst/*) Also instead of calling g_thread_supported() in gst_init(), g_thread_get_initialized() should be called after this change.
How about - adding it to GST_CFLAGS and put it into the .pc file? and/or - adding it to gst_private.h (which does not affect apps of course)
Created attachment 151814 [details] [review] build: Define G_THREADS_MANDATORY everywhere We require threads to be supported in any case and defining this will simplify the mutex, condition variable, etc. macros from gthread to not always check if threads are really supported. Fixes bug #607481.
Like this? :) Can we get this in 0.10.26?
g_thread_get_initialized() was added in glib 2.20, and gst only requires 2.18 now. So either add a #ifdef or bump the requirement.
Created attachment 151816 [details] [review] build: Define G_THREADS_MANDATORY everywhere We require threads to be supported in any case and defining this will simplify the mutex, condition variable, etc. macros from gthread to not always check if threads are really supported. Fixes bug #607481.
commit f137d188cb642094bcd21de75e0856907b99dc22 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Wed Jan 20 06:58:28 2010 +0100 build: Define G_THREADS_MANDATORY everywhere We require threads to be supported in any case and defining this will simplify the mutex, condition variable, etc. macros from gthread to not always check if threads are really supported. Fixes bug #607481.