X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Fx86.h;h=ecc4b2d39b4133cb026fbe98be6cace2c5c3e223;hp=ccc4ce8aab5235a9c6209867d3e99c15f62c1fc0;hb=999991c6e4600c410181baea65bda9f406464872;hpb=f541831e757bc5e0143550f5d686bed0de7d41b7;ds=sidebyside diff --git a/urcu/arch/x86.h b/urcu/arch/x86.h index ccc4ce8..ecc4b2d 100644 --- a/urcu/arch/x86.h +++ b/urcu/arch/x86.h @@ -24,6 +24,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -86,6 +87,20 @@ static inline cycles_t caa_get_cycles(void) return ret; } +/* + * Define the membarrier system call number if not yet available in the + * system headers. + */ +#if (CAA_BITS_PER_LONG == 32) +#ifndef __NR_membarrier +#define __NR_membarrier 375 +#endif +#else +#ifndef __NR_membarrier +#define __NR_membarrier 324 +#endif +#endif + #ifdef __cplusplus } #endif