From 691bf28a5609bb2070c468069fbbd51390c009dd Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 2 Dec 2010 10:36:45 +0200 Subject: [PATCH] Use "rep; nop" in InnoDB if it is available and "pause" is not --- storage/innobase/include/ut0ut.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h index 5c7859a94f5..cd5c7ca99f1 100644 --- a/storage/innobase/include/ut0ut.h +++ b/storage/innobase/include/ut0ut.h @@ -61,6 +61,8 @@ typedef time_t ib_time_t; Also asm volatile may trigger a memory barrier (spilling all registers to memory). */ # define UT_RELAX_CPU() __asm__ __volatile__ ("pause") +#elif defined(HAVE_FAKE_PAUSE_INSTRUCTION) +# define UT_RELAX_CPU() __asm__ __volatile__ ("rep; nop") #elif defined(HAVE_ATOMIC_BUILTINS) # define UT_RELAX_CPU() do { \ volatile lint volatile_var; \