x86: allocate membarrier system call number
[urcu.git] / urcu / arch / x86.h
index ccc4ce8aab5235a9c6209867d3e99c15f62c1fc0..ecc4b2d39b4133cb026fbe98be6cace2c5c3e223 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <urcu/compiler.h>
 #include <urcu/config.h>
+#include <urcu/syscall-compat.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -86,6 +87,20 @@ static inline cycles_t caa_get_cycles(void)
         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
This page took 0.022018 seconds and 4 git commands to generate.