Commit 12c977ca authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-14374 - UT_DELAY code : Removing hardware barrier for arm64 bit platform

UT_RELAX_CPU() is supposed to waste a few CPU cycles, there's no need to
load other system components.
parent a489d919
...@@ -45,6 +45,7 @@ Created 1/20/1994 Heikki Tuuri ...@@ -45,6 +45,7 @@ Created 1/20/1994 Heikki Tuuri
#include <stdarg.h> #include <stdarg.h>
#include <string> #include <string>
#include <my_atomic.h>
/** Index name prefix in fast index creation, as a string constant */ /** Index name prefix in fast index creation, as a string constant */
#define TEMP_INDEX_PREFIX_STR "\377" #define TEMP_INDEX_PREFIX_STR "\377"
...@@ -74,11 +75,15 @@ typedef time_t ib_time_t; ...@@ -74,11 +75,15 @@ typedef time_t ib_time_t;
# include <sys/platform/ppc.h> # include <sys/platform/ppc.h>
# define UT_RELAX_CPU() __ppc_get_timebase() # define UT_RELAX_CPU() __ppc_get_timebase()
#else #else
# define UT_RELAX_CPU() do { \ static inline void UT_RELAX_CPU(void)
volatile int32 volatile_var; \ {
int32 oldval= 0; \ volatile int32 var;
my_atomic_cas32(&volatile_var, &oldval, 1); \ int32 oldval = 0;
} while (0) my_atomic_cas32_strong_explicit(
&var, &oldval, 1,
MY_MEMORY_ORDER_RELAXED,
MY_MEMORY_ORDER_RELAXED);
}
#endif #endif
#if defined (__GNUC__) #if defined (__GNUC__)
......
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