mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-21 04:31:33 +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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1779,7 +1779,14 @@ SpinLock
|
||||
{
|
||||
while(_InterlockedCompareExchange(&token, 1, 0)!=0)
|
||||
{
|
||||
while(token!=0) _mm_pause();
|
||||
while (token != 0)
|
||||
{
|
||||
#ifdef VCZH_ARM
|
||||
__yield();
|
||||
#else
|
||||
_mm_pause();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user