From: Mathieu Desnoyers Date: Wed, 13 May 2009 17:40:26 +0000 (-0400) Subject: Add rewrite of rep_nop X-Git-Tag: v0.1~227 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=92d1c6565b8cd5c385853a6e1b4ca54184d9d4ac;p=userspace-rcu.git Add rewrite of rep_nop Rewritten from scratch, OK for LGPL license. Signed-off-by: Mathieu Desnoyers --- diff --git a/arch_x86.h b/arch_x86.h index 9e0079d..4a2573e 100644 --- a/arch_x86.h +++ b/arch_x86.h @@ -84,6 +84,11 @@ /* Nop everywhere except on alpha. */ #define smp_read_barrier_depends() +static inline void rep_nop(void) +{ + asm volatile("rep; nop" : : : "memory"); +} + static inline void cpu_relax(void) { rep_nop();