mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-08-18 01:44:28 +08:00
Use __yield instead of _mm_pause on ARM
This commit is contained in:
@@ -1536,7 +1536,14 @@ SpinLock
|
||||
{
|
||||
while(__sync_val_compare_and_swap(&token, 0, 1)!=0)
|
||||
{
|
||||
while(token!=0) _mm_pause();
|
||||
while (token != 0)
|
||||
{
|
||||
#ifdef VCZH_ARM
|
||||
__yield();
|
||||
#else
|
||||
_mm_pause();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user