#include <urcu/compiler.h>
#include <urcu/config.h>
+#include <urcu/syscall-compat.h>
#ifdef __cplusplus
extern "C" {
#define cmm_smp_wmb() __asm__ __volatile__ (LWSYNC_OPCODE:::"memory")
#define mftbl() \
+ __extension__ \
({ \
unsigned long rval; \
__asm__ __volatile__ ("mftbl %0" : "=r" (rval)); \
})
#define mftbu() \
+ __extension__ \
({ \
unsigned long rval; \
__asm__ __volatile__ ("mftbu %0" : "=r" (rval)); \
})
#define mftb() \
+ __extension__ \
({ \
unsigned long long rval; \
__asm__ __volatile__ ("mftb %0" : "=r" (rval)); \
}
#endif
+/*
+ * Define the membarrier system call number if not yet available in the
+ * system headers.
+ */
+#ifndef __NR_membarrier
+#define __NR_membarrier 365
+#endif
+
#ifdef __cplusplus
}
#endif