caa_get_cycles: caa_ prefix for type, use CLOCK_MONOTONIC
[urcu.git] / urcu / arch / x86.h
index ecc4b2d39b4133cb026fbe98be6cace2c5c3e223..b4d3694fdffb896fa3773f30ad8d0777ae9836a4 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
 
@@ -69,6 +70,8 @@ extern "C" {
 
 #define caa_cpu_relax()        __asm__ __volatile__ ("rep; nop" : : : "memory")
 
+#define HAS_CAA_GET_CYCLES
+
 #define rdtscll(val)                                                     \
        do {                                                              \
             unsigned int __a, __d;                                       \
@@ -77,11 +80,11 @@ 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;
@@ -101,7 +104,7 @@ static inline cycles_t caa_get_cycles(void)
 #endif
 #endif
 
-#ifdef __cplusplus 
+#ifdef __cplusplus
 }
 #endif
 
This page took 0.023291 seconds and 4 git commands to generate.