X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=urcu%2Farch_s390.h;h=d7db70d741075e6de10f29e8ccc38d2e21b24931;hb=94b7b9d25402e563a44651e65a29c88d41255bca;hp=fc7b3bc2d6b27a979485f1d84a366acc53311820;hpb=1655f01899c0f8308d66e9ef59e7036f0233243c;p=urcu.git diff --git a/urcu/arch_s390.h b/urcu/arch_s390.h index fc7b3bc..d7db70d 100644 --- a/urcu/arch_s390.h +++ b/urcu/arch_s390.h @@ -1,5 +1,5 @@ -#ifndef _ARCH_S390_H -#define _ARCH_S390_H +#ifndef _URCU_ARCH_S390_H +#define _URCU_ARCH_S390_H /* * Trivial definitions for the S390 architecture based on information from the @@ -31,15 +31,29 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #define CONFIG_HAVE_MEM_COHERENCY +#define CACHE_LINE_SIZE 128 + +#ifndef __SIZEOF_LONG__ +#ifdef __s390x__ +#define __SIZEOF_LONG__ 8 +#else +#define __SIZEOF_LONG__ 4 +#endif +#endif + #ifndef BITS_PER_LONG #define BITS_PER_LONG (__SIZEOF_LONG__ * 8) #endif #define mb() __asm__ __volatile__("bcr 15,0" : : : "memory") -#define rmb() __asm__ __volatile__("bcr 15,0" : : : "memory"); -#define wmb() __asm__ __volatile__("bcr 15,0" : : : "memory"); +#define rmb() __asm__ __volatile__("bcr 15,0" : : : "memory") +#define wmb() __asm__ __volatile__("bcr 15,0" : : : "memory") #define mc() barrier() #define rmc() barrier() #define wmc() barrier() @@ -84,4 +98,8 @@ static inline cycles_t get_cycles (void) return cycles; } -#endif /* _ARCH_S390_H */ +#ifdef __cplusplus +} +#endif + +#endif /* _URCU_ARCH_S390_H */