X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Fsparc64.h;h=1ff40f5c4698d4d7fd693098a16aabedcf1ba45a;hp=2ccb86fc357c27f9dcda255088bd4336b42f21a5;hb=994d4955b9fff8b8b695c7ad887a91357f6964c4;hpb=999991c6e4600c410181baea65bda9f406464872 diff --git a/urcu/arch/sparc64.h b/urcu/arch/sparc64.h index 2ccb86f..1ff40f5 100644 --- a/urcu/arch/sparc64.h +++ b/urcu/arch/sparc64.h @@ -28,7 +28,15 @@ #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 @@ -45,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