Skip to content

Commit f3dc07d

Browse files
committed
Update UT_RELAX_CPU to match upstream changes in MySQL
http://github.com/mysql/mysql-server/pull/305 uses an 'isb' which makes the adaptive-spin behavior match x86s
1 parent 2b19329 commit f3dc07d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/mysql/include/ut_atomics.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ this program; if not, write to the Free Software Foundation, Inc.,
2121

2222
#if defined(__x86_64__)
2323
#define UT_RELAX_CPU() asm volatile ("rep; nop")
24-
#elif defined(__AARCH64__)
24+
#elif defined(__aarch64__)
2525
// Theoretically we could emit a yield here but MySQL doesn't do it
2626
// and most ARM cores are likely to NOP it anyway
27-
#define UT_RELAX_CPU() asm volatile ("":::"memory")
27+
#define UT_RELAX_CPU() asm volatile ("isb":::"memory")
2828
#else
2929
#define UT_RELAX_CPU() asm volatile ("":::"memory")
3030
#endif

0 commit comments

Comments
 (0)