hppa: allocate membarrier system call number
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 16 Nov 2015 16:31:10 +0000 (11:31 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 16 Nov 2015 16:31:10 +0000 (11:31 -0500)
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 <mathieu.desnoyers@efficios.com>
urcu/arch/hppa.h

index f92b0ab594b43cf801aab944a1b47bf6df82c0b5..c8d4d057708e1d5fe603697b12200ca54d0d5682 100644 (file)
@@ -32,6 +32,14 @@ extern "C" {
 #include <stdlib.h>
 #include <sys/time.h>
 
+/*
+ * 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;
 
This page took 0.033532 seconds and 4 git commands to generate.