Skip to content

Commit c4e5505

Browse files
author
Tzachi Zidenberg
committed
aarch64: support UT_RELAX_CPU macro
an isb is a hardware block that produces some stall without using ALU or other CPU resources. It is fitting for this function.
1 parent ec711bf commit c4e5505

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

storage/innobase/include/ut0ut.h

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ to memory). */
115115
the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
116116
independent way by using YieldProcessor. */
117117
#define UT_RELAX_CPU() YieldProcessor()
118+
#elif defined(__aarch64__)
119+
#define UT_RELAX_CPU() __asm__ __volatile__("isb" ::: "memory")
118120
#else
119121
#define UT_RELAX_CPU() __asm__ __volatile__("" ::: "memory")
120122
#endif

0 commit comments

Comments
 (0)