From c4bc0b1a64e1ef1e105df84401805a16e8dbe82a Mon Sep 17 00:00:00 2001 From: Jens Gustedt Date: Wed, 3 Jan 2018 14:17:12 +0100 Subject: 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. --- src/thread/pthread_create.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/thread/pthread_create.c') 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 -- cgit v1.2.1