X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2F__lock.c;h=21c85fc0636f71f6eb715459590f78ec4e0aaac5;hp=557c6a62329e856537f4e7fe69e4e447bbd0c1f3;hb=28af39fe427ffec8b836f4f30450ffc30b03e5c4;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/src/thread/__lock.c b/src/thread/__lock.c index 557c6a62..21c85fc0 100644 --- a/src/thread/__lock.c +++ b/src/thread/__lock.c @@ -1,12 +1,11 @@ -#define SYSCALL_RETURN_ERRNO #include "pthread_impl.h" 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)) if (spins) spins--, a_spin(); - else syscall0(__NR_sched_yield); + else __syscall(SYS_sched_yield); }