X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Farch%2Fppc.h;h=1784ccdfe4aed8663e9706dc99e3ff0833f509eb;hb=c23069c6cf733ed8a39e64300c264285f658ae23;hp=95393ea0be0ee89b888c64ad53322e41e30631c8;hpb=e51500edbd9919cee53bc85cbb4b22cd4786fc42;p=urcu.git diff --git a/urcu/arch/ppc.h b/urcu/arch/ppc.h index 95393ea..1784ccd 100644 --- a/urcu/arch/ppc.h +++ b/urcu/arch/ppc.h @@ -24,6 +24,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -58,6 +59,7 @@ extern "C" { #define cmm_smp_wmb() __asm__ __volatile__ (LWSYNC_OPCODE:::"memory") #define mftbl() \ + __extension__ \ ({ \ unsigned long rval; \ __asm__ __volatile__ ("mftbl %0" : "=r" (rval)); \ @@ -65,6 +67,7 @@ extern "C" { }) #define mftbu() \ + __extension__ \ ({ \ unsigned long rval; \ __asm__ __volatile__ ("mftbu %0" : "=r" (rval)); \ @@ -72,6 +75,7 @@ extern "C" { }) #define mftb() \ + __extension__ \ ({ \ unsigned long long rval; \ __asm__ __volatile__ ("mftb %0" : "=r" (rval)); \ @@ -101,6 +105,14 @@ static inline cycles_t caa_get_cycles(void) } #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