Commit 691bf28a authored by Vasil Dimov's avatar Vasil Dimov

Use "rep; nop" in InnoDB if it is available and "pause" is not

parent 9bfb5ece
...@@ -61,6 +61,8 @@ typedef time_t ib_time_t; ...@@ -61,6 +61,8 @@ typedef time_t ib_time_t;
Also asm volatile may trigger a memory barrier (spilling all registers Also asm volatile may trigger a memory barrier (spilling all registers
to memory). */ to memory). */
# define UT_RELAX_CPU() __asm__ __volatile__ ("pause") # 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) #elif defined(HAVE_ATOMIC_BUILTINS)
# define UT_RELAX_CPU() do { \ # define UT_RELAX_CPU() do { \
volatile lint volatile_var; \ volatile lint volatile_var; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment