X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Farm.h;h=5cbca7d7f1d0d523186b40837ce93ff515615128;hp=e20695ecf3cf6acb142a1830fe5d527c0f4d0cf6;hb=a59f39055b5ecb77b68cf78b9839aa9e8e4ec332;hpb=e51500edbd9919cee53bc85cbb4b22cd4786fc42 diff --git a/urcu/arch/arm.h b/urcu/arch/arm.h index e20695e..5cbca7d 100644 --- a/urcu/arch/arm.h +++ b/urcu/arch/arm.h @@ -24,10 +24,11 @@ #include #include +#include #ifdef __cplusplus extern "C" { -#endif +#endif #ifdef CONFIG_RCU_ARM_HAVE_DMB #define cmm_mb() __asm__ __volatile__ ("dmb":::"memory") @@ -38,20 +39,15 @@ 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; -} +/* + * On Linux, define the membarrier system call number if not yet available in + * the system headers. + */ +#if (defined(__linux__) && !defined(__NR_membarrier)) +#define __NR_membarrier 389 +#endif -#ifdef __cplusplus +#ifdef __cplusplus } #endif