Fix: tests: invoke destroy APIs for queues/stacks
[urcu.git] / urcu / arch / x86.h
index afbf4fad37b68b8cb18f2eccb15f8c308e1eb02d..aac8ca1384b63f4ce321680cffbcaca661a0f16c 100644 (file)
 #include <urcu/compiler.h>
 #include <urcu/config.h>
 #include <urcu/syscall-compat.h>
+#include <stdint.h>
 
 #ifdef __cplusplus
 extern "C" {
-#endif 
+#endif
 
 #define CAA_CACHE_LINE_SIZE    128
 
@@ -79,31 +80,29 @@ extern "C" {
                        | (((unsigned long long)__d) << 32);              \
        } while(0)
 
-typedef unsigned long long cycles_t;
+typedef uint64_t caa_cycles_t;
 
-static inline cycles_t caa_get_cycles(void)
+static inline caa_cycles_t caa_get_cycles(void)
 {
-        cycles_t ret = 0;
+        caa_cycles_t ret = 0;
 
         rdtscll(ret);
         return ret;
 }
 
 /*
- * Define the membarrier system call number if not yet available in the
- * system headers.
+ * On Linux, define the membarrier system call number if not yet available in
+ * the system headers.
  */
+#if (defined(__linux__) && !defined(__NR_membarrier))
 #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 
+#ifdef __cplusplus
 }
 #endif
 
This page took 0.02303 seconds and 4 git commands to generate.