Skip to content

Commit

Permalink
aarch64: support UT_RELAX_CPU macro
Browse files Browse the repository at this point in the history
an isb is a hardware block that produces some stall without using ALU or
other CPU resources. It is fitting for this function.
  • Loading branch information
Tzachi Zidenberg committed Aug 25, 2020
1 parent ec711bf commit c4e5505
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/innobase/include/ut0ut.h
Expand Up @@ -115,6 +115,8 @@ to memory). */
the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
independent way by using YieldProcessor. */
#define UT_RELAX_CPU() YieldProcessor()
#elif defined(__aarch64__)
#define UT_RELAX_CPU() __asm__ __volatile__("isb" ::: "memory")
#else
#define UT_RELAX_CPU() __asm__ __volatile__("" ::: "memory")
#endif
Expand Down

0 comments on commit c4e5505

Please sign in to comment.