#include <urcu/compiler.h>
#include <urcu/config.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define CONFIG_HAVE_MEM_COHERENCY
#define CACHE_LINE_SIZE 128
-#ifndef BITS_PER_LONG
-#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
-#endif
-
-#ifdef CONFIG_HAVE_FENCE
+#ifdef CONFIG_URCU_HAVE_FENCE
#define mb() asm volatile("mfence":::"memory")
#define rmb() asm volatile("lfence":::"memory")
#define wmb() asm volatile("sfence"::: "memory")
#define rmc() barrier()
#define wmc() barrier()
-#ifdef CONFIG_SMP
+#ifdef CONFIG_URCU_SMP
#define smp_mb() mb()
#define smp_rmb() rmb()
#define smp_wmb() wmb()
return ret;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _URCU_ARCH_X86_H */