#include <urcu/compiler.h>
#include <urcu/config.h>
+#include <urcu/syscall-compat.h>
#ifdef __cplusplus
extern "C" {
#endif
#endif
-#define caa_cpu_relax() __asm__ __volatile__ ("rep; nop" : : : "memory");
+#define caa_cpu_relax() __asm__ __volatile__ ("rep; nop" : : : "memory")
#define rdtscll(val) \
do { \
return ret;
}
+/*
+ * Define the membarrier system call number if not yet available in the
+ * system headers.
+ */
+#if (CAA_BITS_PER_LONG == 32)
+#ifndef __NR_membarrier
+#define __NR_membarrier 375
+#endif
+#else
+#ifndef __NR_membarrier
+#define __NR_membarrier 324
+#endif
+#endif
+
#ifdef __cplusplus
}
#endif