X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=urcu%2Farch%2Fs390.h;h=67461b4d6ed1c3f6ac258b0e636a6939fd942871;hb=a59f39055b5ecb77b68cf78b9839aa9e8e4ec332;hp=e12c88c3398728025e745bd53e4c997e1d5e2fca;hpb=67ecffc0f530a7b5c4dd5111ea7dd3213da8eb91;p=urcu.git diff --git a/urcu/arch/s390.h b/urcu/arch/s390.h index e12c88c..67461b4 100644 --- a/urcu/arch/s390.h +++ b/urcu/arch/s390.h @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -42,11 +43,11 @@ extern "C" { #define HAS_CAA_GET_CYCLES -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 cycles; + caa_cycles_t cycles; __asm__ __volatile__("stck %0" : "=m" (cycles) : : "cc", "memory" ); @@ -54,10 +55,10 @@ static inline cycles_t caa_get_cycles (void) } /* - * Define the membarrier system call number if not yet available in the - * system headers. + * On Linux, define the membarrier system call number if not yet available in + * the system headers. */ -#ifndef __NR_membarrier +#if (defined(__linux__) && !defined(__NR_membarrier)) #define __NR_membarrier 356 #endif