mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
yield in spinlock on aarch64
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user