minor locking optimizations
authorRich Felker <dalias@aerifal.cx>
Tue, 14 Jun 2011 05:23:42 +0000 (01:23 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 14 Jun 2011 05:23:42 +0000 (01:23 -0400)
src/thread/__lock.c
src/thread/pthread_create.c

index 2e00636f08e8ff80aea0eabddee4972c01e8b9fe..21c85fc0636f71f6eb715459590f78ec4e0aaac5 100644 (file)
@@ -2,7 +2,7 @@
 
 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))
index a645f9fe3d3b1ab007210d971beb9cb487728e1c..d1eea0cead731d4523d0c09fc114ae91bd27f006 100644 (file)
@@ -22,7 +22,7 @@ void __pthread_unwind_next(struct __ptcb *cb)
                longjmp((void *)cb->__next->__jb, 1);
        }
 
-       LOCK(&self->exitlock);
+       __lock(&self->exitlock);
 
        __pthread_tsd_run_dtors();