hppa: allocate membarrier system call number
[urcu.git] / urcu / arch / hppa.h
index 82d2a426b330869054043681ee4d281b1e85d59e..c8d4d057708e1d5fe603697b12200ca54d0d5682 100644 (file)
@@ -32,12 +32,20 @@ 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 cycles_t;
+typedef unsigned long caa_cycles_t;
 
-static inline cycles_t caa_get_cycles(void)
+static inline caa_cycles_t caa_get_cycles(void)
 {
-       cycles_t cycles;
+       caa_cycles_t cycles;
 
        asm volatile("mfctl 16, %0" : "=r" (cycles));
        return cycles;
This page took 0.024466 seconds and 4 git commands to generate.