Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
#define CACHE_LINE_SIZE 128
-#ifndef BITS_PER_LONG
-#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
-#endif
-
#ifdef CONFIG_URCU_HAVE_FENCE
#define mb() asm volatile("mfence":::"memory")
#define rmb() asm volatile("lfence":::"memory")
#include <urcu/compiler.h>
+#ifndef __SIZEOF_LONG__
+#if defined(__x86_64__) || defined(__amd64__)
+#define __SIZEOF_LONG__ 8
+#else
+#define __SIZEOF_LONG__ 4
+#endif
+#endif
+
#ifndef BITS_PER_LONG
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
#endif