projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef839c7
)
fix broken spinlock due to miscompilation
author
Rich Felker
<dalias@aerifal.cx>
Tue, 29 Mar 2011 02:22:54 +0000
(22:22 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 29 Mar 2011 02:22:54 +0000
(22:22 -0400)
actually this trick also seems to have made the uncontended case slower.
src/thread/pthread_spin_lock.c
patch
|
blob
|
history
diff --git
a/src/thread/pthread_spin_lock.c
b/src/thread/pthread_spin_lock.c
index 9e43f47539d6dad5661936900ffb20e0c9c36b50..59fa6ea89ad2e322f0071724c7ab09275a4a3258 100644
(file)
--- 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;
}