X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Fx86.h;fp=urcu%2Farch%2Fx86.h;h=aac8ca1384b63f4ce321680cffbcaca661a0f16c;hp=b4d3694fdffb896fa3773f30ad8d0777ae9836a4;hb=84f4ccb4bcf32c0336a0c7a3a4ba76d90d6dea1b;hpb=ad46005890368f9c306f0c510b3d4b08c47b66f8 diff --git a/urcu/arch/x86.h b/urcu/arch/x86.h index b4d3694..aac8ca1 100644 --- a/urcu/arch/x86.h +++ b/urcu/arch/x86.h @@ -91,15 +91,13 @@ static inline caa_cycles_t caa_get_cycles(void) } /* - * Define the membarrier system call number if not yet available in the - * system headers. + * On Linux, define the membarrier system call number if not yet available in + * the system headers. */ +#if (defined(__linux__) && !defined(__NR_membarrier)) #if (CAA_BITS_PER_LONG == 32) -#ifndef __NR_membarrier #define __NR_membarrier 375 -#endif #else -#ifndef __NR_membarrier #define __NR_membarrier 324 #endif #endif