From: Mathieu Desnoyers Date: Mon, 16 Nov 2015 16:33:55 +0000 (-0500) Subject: sparc64: allocate membarrier system call number X-Git-Tag: v0.10.0~59 X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=994d4955b9fff8b8b695c7ad887a91357f6964c4;hp=1a186a881c195c0f240c0baa813056b0cc1eab91 sparc64: allocate membarrier system call number Now that the membarrier system call is allocated on sparc, allocate its number in our architecture header if the system headers don't allocate it. This allows using the membarrier system call as soon as implemented in the kernel, even if the distribution has old kernel headers. Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/arch/sparc64.h b/urcu/arch/sparc64.h index 6ce323f..1ff40f5 100644 --- a/urcu/arch/sparc64.h +++ b/urcu/arch/sparc64.h @@ -30,6 +30,14 @@ extern "C" { #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 /*