Cleanup: remove trailing whitespaces at EOL
[urcu.git] / urcu / arch / x86.h
index 7af1ca524e091fb9f9aaa8b6c2d1d102d3abe270..a5b3a23b385f26f7aea6b5daaf70cab762fc4262 100644 (file)
 
 #include <urcu/compiler.h>
 #include <urcu/config.h>
 
 #include <urcu/compiler.h>
 #include <urcu/config.h>
+#include <urcu/syscall-compat.h>
 
 #ifdef __cplusplus
 extern "C" {
 
 #ifdef __cplusplus
 extern "C" {
-#endif 
+#endif
 
 #define CAA_CACHE_LINE_SIZE    128
 
 
 #define CAA_CACHE_LINE_SIZE    128
 
@@ -66,7 +67,9 @@ extern "C" {
 #endif
 #endif
 
 #endif
 #endif
 
-#define caa_cpu_relax()        __asm__ __volatile__ ("rep; nop" : : : "memory");
+#define caa_cpu_relax()        __asm__ __volatile__ ("rep; nop" : : : "memory")
+
+#define HAS_CAA_GET_CYCLES
 
 #define rdtscll(val)                                                     \
        do {                                                              \
 
 #define rdtscll(val)                                                     \
        do {                                                              \
@@ -86,7 +89,21 @@ static inline cycles_t caa_get_cycles(void)
         return ret;
 }
 
         return ret;
 }
 
-#ifdef __cplusplus 
+/*
+ * 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
 
 }
 #endif
 
This page took 0.023118 seconds and 4 git commands to generate.