X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Faarch64.h;h=d6a133758dffca0c22ca5f6e94314c4c6d0d5390;hp=946e1c64699f8a97e7d5d18de5b2e02aa8aed7eb;hb=84f4ccb4bcf32c0336a0c7a3a4ba76d90d6dea1b;hpb=3aea2ae08850f2f6e9ddab451e004adf78d42ddd diff --git a/urcu/arch/aarch64.h b/urcu/arch/aarch64.h index 946e1c6..d6a1337 100644 --- a/urcu/arch/aarch64.h +++ b/urcu/arch/aarch64.h @@ -33,25 +33,12 @@ extern "C" { #include #include -typedef unsigned long long cycles_t; - -static inline cycles_t caa_get_cycles (void) -{ - cycles_t thetime; - struct timeval tv; - - if (gettimeofday(&tv, NULL) != 0) - return 0; - thetime = ((cycles_t)tv.tv_sec) * 1000000ULL + ((cycles_t)tv.tv_usec); - return (cycles_t)thetime; -} - /* - * Define the membarrier system call number if not yet available in the - * system headers. aarch64 implements asm-generic/unistd.h system call + * On Linux, define the membarrier system call number if not yet available in + * the system headers. aarch64 implements asm-generic/unistd.h system call * numbers. */ -#ifndef __NR_membarrier +#if (defined(__linux__) && !defined(__NR_membarrier)) #define __NR_membarrier 283 #endif