aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvskipin <vskipin@yandex-team.ru>2022-02-09 11:31:00 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 15:58:17 +0300
commit6b813c17d56d1d05f92c61ddc347d0e4d358fe85 (patch)
tree28fcba65e4c171554b96d4acf608ee5dfb6a5fad
parent3bc7755707d0cc1e0dcb0612b2c810efd69998a5 (diff)
downloadydb-6b813c17d56d1d05f92c61ddc347d0e4d358fe85.tar.gz
SpinLockPause for arm64
ref:d77b45efddd00e5c5b27a14ed3422f7a256372d7
-rw-r--r--util/system/spinlock.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/system/spinlock.h b/util/system/spinlock.h
index aa81d1cf2e..af2630890a 100644
--- a/util/system/spinlock.h
+++ b/util/system/spinlock.h
@@ -27,8 +27,13 @@ protected:
};
static inline void SpinLockPause() {
-#if defined(__GNUC__) && (defined(_i386_) || defined(_x86_64_))
+#if defined(__GNUC__)
+ #if defined(_i386_) || defined(_x86_64_)
__asm __volatile("pause");
+ #elif defined(_arm64_)
+ __asm __volatile("yield" ::
+ : "memory");
+ #endif
#endif
}