summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-10-16 15:13:51 +0100
committerTom Hacohen <tom@stosb.com>2015-11-09 11:43:04 +0000
commit0bebaed0acd3b07d2d85e0269344f628a5d9e575 (patch)
tree495f6e9d70a859c18e7c73a1461c364e923b52ac /configure.ac
parent3e40b45be65b21a9941a1531c721216c3301d7a8 (diff)
Eo do: use the __thread directive when available to manage call stack.
This is faster in most cases, and to be honest, should be much faster than it is. I don't understand why there's no better directive to mark a variable as *really* important thread storage that is used all the time.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5ecbcac..f0980ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -984,6 +984,20 @@ if test "x${efl_have_threads}" = "xno"; then
984 CFOPT_WARNING="xyes" 984 CFOPT_WARNING="xyes"
985fi 985fi
986 986
987AC_COMPILE_IFELSE(
988 [AC_LANG_PROGRAM(
989 [[ ]],
990 [[
991 static __thread int a = 0;
992 ]])],
993 [have_thread_specifier="yes"],
994 [have_thread_specifier="no"])
995AC_MSG_CHECKING([for __thread specifier])
996AC_MSG_RESULT([${have_thread_specifier}])
997if test "x${have_thread_specifier}" = "xyes" ; then
998 AC_DEFINE([HAVE_THREAD_SPECIFIER], [1], [Have the __thread specifier])
999fi
1000
987EFL_ADD_PUBLIC_LIBS([EINA], [${EFL_PTHREAD_LIBS}]) 1001EFL_ADD_PUBLIC_LIBS([EINA], [${EFL_PTHREAD_LIBS}])
988EFL_ADD_CFLAGS([EINA], [${EFL_PTHREAD_CFLAGS}]) 1002EFL_ADD_CFLAGS([EINA], [${EFL_PTHREAD_CFLAGS}])
989 1003
@@ -4868,6 +4882,7 @@ EFL_ADD_FEATURE([thread], [spinlocks], [${efl_have_spinlock}])
4868EFL_ADD_FEATURE([thread], [barrier], [${efl_have_pthread_barrier}]) 4882EFL_ADD_FEATURE([thread], [barrier], [${efl_have_pthread_barrier}])
4869EFL_ADD_FEATURE([thread], [affinity], [${efl_have_setaffinity}]) 4883EFL_ADD_FEATURE([thread], [affinity], [${efl_have_setaffinity}])
4870EFL_ADD_FEATURE([thread], [setname], [${efl_have_setname}]) 4884EFL_ADD_FEATURE([thread], [setname], [${efl_have_setname}])
4885EFL_ADD_FEATURE([thread], [__thread], [${have_thread_specifier}])
4871 4886
4872echo 4887echo
4873echo 4888echo