From 1a186a881c195c0f240c0baa813056b0cc1eab91 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 16 Nov 2015 11:31:10 -0500 Subject: [PATCH] hppa: allocate membarrier system call number Now that the membarrier system call is allocated on hppa (parisc), 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 --- urcu/arch/hppa.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/urcu/arch/hppa.h b/urcu/arch/hppa.h index f92b0ab..c8d4d05 100644 --- a/urcu/arch/hppa.h +++ b/urcu/arch/hppa.h @@ -32,6 +32,14 @@ extern "C" { #include #include +/* + * 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 343 +#endif + #define HAS_CAA_GET_CYCLES typedef unsigned long caa_cycles_t; -- 2.34.1