optimize spinlock spin

This commit is contained in:
Rich Felker 2011-03-24 23:05:17 -04:00
parent 8ae2fa6563
commit c322fe4e1a

View file

@ -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;
}