yield in spinlock on aarch64

This commit is contained in:
Frank Denis
2020-03-30 22:00:35 +02:00
parent bf3bc8c386
commit 2d5b9547d1
+3 -1
View File
@@ -151,7 +151,9 @@ sodium_crit_enter(void)
# ifdef HAVE_NANOSLEEP
(void) nanosleep(&q, NULL);
# elif defined(__x86_64__) || defined(__i386__)
__asm__ __volatile__ ("pause");
__asm__ __volatile__ ("pause":::"memory");
# elif defined(__aarch64__)
__asm__ __volatile__ ("yield":::"memory");
# endif
}
return 0;