mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-06 21:00:07 +02:00
Use unconditional thread calls in gio and gobject
If threads are available we always enable threads in gobject, which means all gio/gobject code can enable the unconditional thread calls. This is a minor optimization since we avoid a bunch of unnecessary is-threads-enabled checks. https://bugzilla.gnome.org/show_bug.cgi?id=606775
This commit is contained in:
parent
de5c708e0b
commit
94b8613b5f
@ -2349,6 +2349,7 @@ case $host in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
AM_CONDITIONAL(HAVE_THREADS, [test "$have_threads" != "none"])
|
||||||
AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c",
|
AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c",
|
||||||
[Source file containing theread implementation])
|
[Source file containing theread implementation])
|
||||||
AC_SUBST(G_THREAD_CFLAGS)
|
AC_SUBST(G_THREAD_CFLAGS)
|
||||||
|
@ -41,6 +41,10 @@ TESTS = abicheck.sh pltcheck.sh
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if HAVE_THREADS
|
||||||
|
THREAD_FLAGS=-DG_THREADS_MANDATORY
|
||||||
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-DG_LOG_DOMAIN=\"GLib-GIO\" \
|
-DG_LOG_DOMAIN=\"GLib-GIO\" \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
@ -48,6 +52,7 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/glib \
|
-I$(top_srcdir)/glib \
|
||||||
-I$(top_srcdir)/gmodule \
|
-I$(top_srcdir)/gmodule \
|
||||||
$(GLIB_DEBUG_FLAGS) \
|
$(GLIB_DEBUG_FLAGS) \
|
||||||
|
$(THREAD_FLAGS) \
|
||||||
-DG_DISABLE_DEPRECATED \
|
-DG_DISABLE_DEPRECATED \
|
||||||
-DGIO_COMPILATION \
|
-DGIO_COMPILATION \
|
||||||
-DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
|
-DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"
|
||||||
|
@ -6,12 +6,17 @@ include $(top_srcdir)/Makefile.decl
|
|||||||
|
|
||||||
SUBDIRS = . tests
|
SUBDIRS = . tests
|
||||||
|
|
||||||
|
if HAVE_THREADS
|
||||||
|
THREAD_FLAGS=-DG_THREADS_MANDATORY
|
||||||
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-DG_LOG_DOMAIN=\"GLib-GObject\" \
|
-DG_LOG_DOMAIN=\"GLib-GObject\" \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_srcdir)/glib \
|
-I$(top_srcdir)/glib \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
$(GLIB_DEBUG_FLAGS) \
|
$(GLIB_DEBUG_FLAGS) \
|
||||||
|
$(THREAD_FLAGS) \
|
||||||
-DG_DISABLE_DEPRECATED \
|
-DG_DISABLE_DEPRECATED \
|
||||||
-DGOBJECT_COMPILATION \
|
-DGOBJECT_COMPILATION \
|
||||||
-DG_DISABLE_CONST_RETURNS
|
-DG_DISABLE_CONST_RETURNS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user