Skip to content

Commit

Permalink
Use __yield on ARM64 Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansson authored Apr 1, 2024
2 parents d20307b + ba9b001 commit e4393ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rpmalloc/rpmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,11 @@ rpmalloc_set_main_thread(void) {
static void
_rpmalloc_spin(void) {
#if defined(_MSC_VER)
#if defined(_M_ARM64)
__yield();
#else
_mm_pause();
#endif
#elif defined(__x86_64__) || defined(__i386__)
__asm__ volatile("pause" ::: "memory");
#elif defined(__aarch64__) || (defined(__arm__) && __ARM_ARCH >= 7)
Expand Down

0 comments on commit e4393ff

Please sign in to comment.