X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Farm.h;h=9483bab0e23761a8f6e853dfbe9258b73adb8256;hp=e20695ecf3cf6acb142a1830fe5d527c0f4d0cf6;hb=f8c43f458c80566d298d539ec518a8be8c7cc861;hpb=e51500edbd9919cee53bc85cbb4b22cd4786fc42 diff --git a/urcu/arch/arm.h b/urcu/arch/arm.h index e20695e..9483bab 100644 --- a/urcu/arch/arm.h +++ b/urcu/arch/arm.h @@ -24,6 +24,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -38,18 +39,13 @@ 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. + */ +#ifndef __NR_membarrier +#define __NR_membarrier 389 +#endif #ifdef __cplusplus }