X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Fsparc64.h;h=1ff40f5c4698d4d7fd693098a16aabedcf1ba45a;hp=46e26658af3cd2c71f45dde5a9a9b0b1fe415d92;hb=994d4955b9fff8b8b695c7ad887a91357f6964c4;hpb=9d2614f07691a813a3c560a6c0bcd0a7be854ed5 diff --git a/urcu/arch/sparc64.h b/urcu/arch/sparc64.h index 46e2665..1ff40f5 100644 --- a/urcu/arch/sparc64.h +++ b/urcu/arch/sparc64.h @@ -24,10 +24,19 @@ #include #include +#include #ifdef __cplusplus extern "C" { -#endif +#endif + +/* + * 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 351 +#endif #define CAA_CACHE_LINE_SIZE 256 @@ -44,14 +53,7 @@ __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ #define cmm_rmb() membar_safe("#LoadLoad") #define cmm_wmb() membar_safe("#StoreStore") -typedef unsigned long long cycles_t; - -static inline cycles_t caa_get_cycles (void) -{ - return 0; /* unimplemented */ -} - -#ifdef __cplusplus +#ifdef __cplusplus } #endif