about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-14 01:23:42 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-14 01:23:42 -0400
commit6232b96f5153d0b718054a8bc569fcd7d596bab2 (patch)
tree0fe36b6b009ece51152b40777c4a31d79b25f374
parent0e1762539c2ad359ba10502cdfb750b5afd2329e (diff)
downloadmusl-6232b96f5153d0b718054a8bc569fcd7d596bab2.tar.gz
musl-6232b96f5153d0b718054a8bc569fcd7d596bab2.tar.xz
musl-6232b96f5153d0b718054a8bc569fcd7d596bab2.zip
minor locking optimizations
-rw-r--r--src/thread/__lock.c2
-rw-r--r--src/thread/pthread_create.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/thread/__lock.c b/src/thread/__lock.c
index 2e00636f..21c85fc0 100644
--- a/src/thread/__lock.c
+++ b/src/thread/__lock.c
@@ -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))
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index a645f9fe..d1eea0ce 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -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();