X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Ftile.h;h=eae1161f2203340cc96e764d2298de5983af6450;hp=2787ac75ab8ba8835290cacbfccc6b0c78978748;hb=a59f39055b5ecb77b68cf78b9839aa9e8e4ec332;hpb=c23069c6cf733ed8a39e64300c264285f658ae23 diff --git a/urcu/arch/tile.h b/urcu/arch/tile.h index 2787ac7..eae1161 100644 --- a/urcu/arch/tile.h +++ b/urcu/arch/tile.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. tile implements asm-generic/unistd.h system call + * On Linux, define the membarrier system call number if not yet available in + * the system headers. tile implements asm-generic/unistd.h system call * numbers. */ -#ifndef __NR_membarrier +#if (defined(__linux__) && !defined(__NR_membarrier)) #define __NR_membarrier 283 #endif