From 92d1c6565b8cd5c385853a6e1b4ca54184d9d4ac Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 13 May 2009 13:40:26 -0400 Subject: [PATCH] Add rewrite of rep_nop Rewritten from scratch, OK for LGPL license. Signed-off-by: Mathieu Desnoyers --- arch_x86.h | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- 2.34.1