mirror of
https://github.com/fluencelabs/musl
synced 2025-06-23 19:52:01 +00:00
optimize spinlock spin
This commit is contained in:
@ -2,6 +2,6 @@
|
||||
|
||||
int pthread_spin_lock(pthread_spinlock_t *s)
|
||||
{
|
||||
while (a_xchg(s, 1));
|
||||
while (*s || a_xchg(s, 1));
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user