X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Fsparc64.h;h=1ff40f5c4698d4d7fd693098a16aabedcf1ba45a;hp=fb99450d36fd0521d1fcb9de72f97cd229cab579;hb=994d4955b9fff8b8b695c7ad887a91357f6964c4;hpb=f8c43f458c80566d298d539ec518a8be8c7cc861 diff --git a/urcu/arch/sparc64.h b/urcu/arch/sparc64.h index fb99450..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,7 +53,7 @@ __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ #define cmm_rmb() membar_safe("#LoadLoad") #define cmm_wmb() membar_safe("#StoreStore") -#ifdef __cplusplus +#ifdef __cplusplus } #endif