X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2F__lock.c;h=d1717956a6f96f3ec1b0bb490350aab0dad4cf13;hp=21cb71a84cf9b7c94789319c880aee2b30710d07;hb=97c5b5a87c3d9df54278e1073d6177f77536bd32;hpb=685e40bb09f5f24a2af54ea09c97328808f76990 diff --git a/src/thread/__lock.c b/src/thread/__lock.c index 21cb71a8..d1717956 100644 --- a/src/thread/__lock.c +++ b/src/thread/__lock.c @@ -2,10 +2,10 @@ void __lock(volatile int *l) { - int spins=100000; + int spins=10000; /* 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(__NR_sched_yield); + else __syscall(SYS_sched_yield); }