X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Fs390.h;h=67461b4d6ed1c3f6ac258b0e636a6939fd942871;hp=86a0a3689244b1ec2f9772fcda5a1093138aec2f;hb=2af1c19e6a553878fcb2a5106f050d5ed7ac0f54;hpb=f8c43f458c80566d298d539ec518a8be8c7cc861 diff --git a/urcu/arch/s390.h b/urcu/arch/s390.h index 86a0a36..67461b4 100644 --- a/urcu/arch/s390.h +++ b/urcu/arch/s390.h @@ -31,10 +31,11 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { -#endif +#endif #define CAA_CACHE_LINE_SIZE 128 @@ -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,14 +55,14 @@ 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 -#ifdef __cplusplus +#ifdef __cplusplus } #endif