#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
#define caa_cpu_relax() __asm__ __volatile__ ("rep; nop" : : : "memory")
+#define HAS_CAA_GET_CYCLES
+
#define rdtscll(val) \
do { \
unsigned int __a, __d; \
| (((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;
#endif
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif