fix broken spinlock due to miscompilation

actually this trick also seems to have made the uncontended case slower.
This commit is contained in:
Rich Felker 2011-03-28 22:22:54 -04:00
parent ef839c73d7
commit 117581ca69
1 changed files with 1 additions and 1 deletions

View File

@ -2,6 +2,6 @@
int pthread_spin_lock(pthread_spinlock_t *s)
{
while (*s || a_xchg(s, 1));
while (a_xchg(s, 1));
return 0;
}