fix broken spinlock due to miscompilation
actually this trick also seems to have made the uncontended case slower.
This commit is contained in:
parent
ef839c73d7
commit
117581ca69
1 changed files with 1 additions and 1 deletions
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
int pthread_spin_lock(pthread_spinlock_t *s)
|
int pthread_spin_lock(pthread_spinlock_t *s)
|
||||||
{
|
{
|
||||||
while (*s || a_xchg(s, 1));
|
while (a_xchg(s, 1));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue