add CONFIG_HAVE_FENCE on x86's newer than i586
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 8 Oct 2009 04:56:59 +0000 (00:56 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 8 Oct 2009 04:56:59 +0000 (00:56 -0400)
Patch originally from Pierre-Marc Fournier, modified.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
configure.ac
urcu/arch_x86.h

index 422b11b31f721a7ba32adc3a6e55d52067e1a3ee..a4e675fca1f87aa2262a638566f1bf8414dd9794 100644 (file)
@@ -10,6 +10,8 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
 AC_CONFIG_SRCDIR([urcu.h])
 
 AH_TEMPLATE([CONFIG_SMP], [Enable SMP support. With SMP support enabled, uniprocessors are also supported. With SMP support disabled, UP systems work fine, but the behavior of SMP systems is undefined.])
+AH_TEMPLATE([CONFIG_HAVE_FENCE], [Defined when on a system that has memory fence
+instructions.])
 AC_CONFIG_HEADERS([config.h])
 
 # Checks for programs.
@@ -49,6 +51,15 @@ fi
 AC_SUBST(ARCHTYPE)
 AC_SUBST(SUBARCHTYPE)
 
+[
+if test "x$ARCHTYPE" = "xx86" -a "x$target_cpu" != "xi386" -a "x$target_cpu" !=
+"xi486" -a "x$target_cpu" != "xi586"; then
+]
+       AC_DEFINE([CONFIG_HAVE_FENCE], [1])
+[
+fi
+]
+
 AM_CONDITIONAL([GCC_API], [test "x$ARCHTYPE" != xx86 -a "x$ARCHTYPE" != xppc])
 
 AM_CONDITIONAL([COMPAT_ARCH], [test "x$SUBARCHTYPE" == xx86compat ])
index 806878e26791132b1813c1ca25197efee59b06ce..7d3d76db7a2c19ed5890869817109582a657073b 100644 (file)
@@ -25,8 +25,6 @@
 #include <urcu/compiler.h>
 #include "config.h"
 
-/* Assume P4 or newer */
-#define CONFIG_HAVE_FENCE 1
 #define CONFIG_HAVE_MEM_COHERENCY
 
 #define CACHE_LINE_SIZE        128
This page took 0.027149 seconds and 4 git commands to generate.