summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-28 22:22:54 -0400
committerRich Felker <dalias@aerifal.cx>2011-03-28 22:22:54 -0400
commit117581ca69ec2a9c341390eed353646b47a512df (patch)
tree21b9c706b2c76a5ada72cb0760fdbb27267f9727 /src
parentef839c73d7ad51249550675defdcb24349e6ffd0 (diff)
downloadmusl-117581ca69ec2a9c341390eed353646b47a512df.tar.gz
musl-117581ca69ec2a9c341390eed353646b47a512df.tar.bz2
musl-117581ca69ec2a9c341390eed353646b47a512df.tar.xz
musl-117581ca69ec2a9c341390eed353646b47a512df.zip
fix broken spinlock due to miscompilation
actually this trick also seems to have made the uncontended case slower.
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 9e43f475..59fa6ea8 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 (*s || a_xchg(s, 1));
+ while (a_xchg(s, 1));
return 0;
}