projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dynamic linker entry point for arm
[musl]
/
src
/
thread
/
__lock.c
diff --git
a/src/thread/__lock.c
b/src/thread/__lock.c
index
2e00636
..
d171795
100644
(file)
--- a/
src/thread/__lock.c
+++ b/
src/thread/__lock.c
@@
-2,10
+2,10
@@
void __lock(volatile int *l)
{
void __lock(volatile int *l)
{
- int spins=10000
0
;
+ int spins=10000;
/* Do not use futexes because we insist that unlocking is a simple
* assignment to optimize non-pathological code with no contention. */
/* Do not use futexes because we insist that unlocking is a simple
* assignment to optimize non-pathological code with no contention. */
- while (a_
xchg
(l, 1))
+ while (a_
swap
(l, 1))
if (spins) spins--, a_spin();
else __syscall(SYS_sched_yield);
}
if (spins) spins--, a_spin();
else __syscall(SYS_sched_yield);
}