X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=arch_x86.h;fp=arch_x86.h;h=e7d945e3859393edece5eb4b2aee4c99538083e2;hp=4a2573e0f52934e3a2635516ad5f66cfd7c5c563;hb=ebb22fff4a06b0661b55726ad332c4c53f6603fe;hpb=92d1c6565b8cd5c385853a6e1b4ca54184d9d4ac diff --git a/arch_x86.h b/arch_x86.h index 4a2573e..e7d945e 100644 --- a/arch_x86.h +++ b/arch_x86.h @@ -94,6 +94,14 @@ static inline void cpu_relax(void) rep_nop(); } +/* + * Serialize core instruction execution. Also acts as a compiler barrier. + */ +static inline void sync_core(void) +{ + asm volatile("cpuid" : : : "memory", "eax", "ebx", "ecx", "edx"); +} + #define rdtscll(val) \ do { \ unsigned int __a, __d; \