The membarrier syscall has been allocated in Linux 4.13, allocate its
number in our architecture header if the system headers don't allocate
it.
Change-Id: Iebb77b94bf803a7a8b7ebd9f4124219f386334ae
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#define cmm_wmb() __asm__ __volatile__ ("wmb":::"memory")
#define cmm_read_barrier_depends() __asm__ __volatile__ ("mb":::"memory")
+/*
+ * 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 517
+#endif
+
#ifdef __cplusplus
}
#endif