summaryrefslogtreecommitdiff
path: root/src/thread/pthread_create.c
diff options
context:
space:
mode:
authorJens Gustedt <Jens.Gustedt@inria.fr>2018-01-03 14:17:12 +0100
committerRich Felker <dalias@aerifal.cx>2018-01-09 13:14:49 -0500
commitc4bc0b1a64e1ef1e105df84401805a16e8dbe82a (patch)
treed4aa94638bb44b688b1c0acd8cfa02259c15bd4f /src/thread/pthread_create.c
parent47d0bcd4762f223364e5b58d5a381aaa0cbd7c38 (diff)
downloadmusl-c4bc0b1a64e1ef1e105df84401805a16e8dbe82a.tar.gz
consistently use the LOCK an UNLOCK macros
In some places there has been a direct usage of the functions. Use the macros consistently everywhere, such that it might be easier later on to capture the fast path directly inside the macro and only have the call overhead on the slow path.
Diffstat (limited to 'src/thread/pthread_create.c')
-rw-r--r--src/thread/pthread_create.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 6cbf85b3..34cd9936 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -37,10 +37,10 @@ _Noreturn void __pthread_exit(void *result)
__pthread_tsd_run_dtors();
- __lock(self->exitlock);
+ LOCK(self->exitlock);
/* Mark this thread dead before decrementing count */
- __lock(self->killlock);
+ LOCK(self->killlock);
self->dead = 1;
/* Block all signals before decrementing the live thread count.
@@ -54,7 +54,7 @@ _Noreturn void __pthread_exit(void *result)
* been blocked. This precludes observation of the thread id
* as a live thread (with application code running in it) after
* the thread was reported dead by ESRCH being returned. */
- __unlock(self->killlock);
+ UNLOCK(self->killlock);
/* It's impossible to determine whether this is "the last thread"
* until performing the atomic decrement, since multiple threads