summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-24 23:05:17 -0400
committerRich Felker <dalias@aerifal.cx>2011-03-24 23:05:17 -0400
commitc322fe4e1a9bcc20f7a2ded1ac0e1674ea282bc0 (patch)
treed09602930aeb632a17ad271e0775499790a02b2e /src
parent8ae2fa65636b732e04e19b2521edc335867ba53b (diff)
downloadmusl-c322fe4e1a9bcc20f7a2ded1ac0e1674ea282bc0.tar.gz
optimize spinlock spin
Diffstat (limited to 'src')
-rw-r--r--src/thread/pthread_spin_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_spin_lock.c b/src/thread/pthread_spin_lock.c
index 59fa6ea8..9e43f475 100644
--- a/src/thread/pthread_spin_lock.c
+++ b/src/thread/pthread_spin_lock.c
@@ -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;
}