diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index 6cbf85b32e052342032a09fc2e0f43530a9b7f25..34cd9936b1c037828daf48dfc4bd84895f822cd5 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 diff --git a/src/thread/pthread_detach.c b/src/thread/pthread_detach.c index d9c90d1c89fa9ab56024eef5464db64e040e9c1c..692bbaf9cb643d111c69dc52ac8f5acda2eb89d5 100644 --- a/src/thread/pthread_detach.c +++ b/src/thread/pthread_detach.c @@ -9,7 +9,7 @@ static int __pthread_detach(pthread_t t) if (a_cas(t->exitlock, 0, INT_MIN + 1)) return __pthread_join(t, 0); t->detached = 2; - __unlock(t->exitlock); + UNLOCK(t->exitlock); return 0; } diff --git a/src/thread/pthread_getschedparam.c b/src/thread/pthread_getschedparam.c index 3053c1865e0a1f1d2c6c8ea16d30ecdcddfb4a7d..a994b637306a40c1155c1e400bfd2816b888676e 100644 --- a/src/thread/pthread_getschedparam.c +++ b/src/thread/pthread_getschedparam.c @@ -3,7 +3,7 @@ int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param *restrict param) { int r; - __lock(t->killlock); + LOCK(t->killlock); if (t->dead) { r = ESRCH; } else { @@ -12,6 +12,6 @@ int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param *policy = __syscall(SYS_sched_getscheduler, t->tid); } } - __unlock(t->killlock); + UNLOCK(t->killlock); return r; } diff --git a/src/thread/pthread_kill.c b/src/thread/pthread_kill.c index acdb1ea6173c27284ed946a63831855908f28f19..f090342064d867de24b9287694b02927afe2bd0f 100644 --- a/src/thread/pthread_kill.c +++ b/src/thread/pthread_kill.c @@ -3,8 +3,8 @@ int pthread_kill(pthread_t t, int sig) { int r; - __lock(t->killlock); + LOCK(t->killlock); r = t->dead ? ESRCH : -__syscall(SYS_tkill, t->tid, sig); - __unlock(t->killlock); + UNLOCK(t->killlock); return r; } diff --git a/src/thread/pthread_setschedparam.c b/src/thread/pthread_setschedparam.c index c4738d643bdad782674836477992f02b608eabc8..9e2fa45674ff6f80abd4979dae17f23d51b08dcd 100644 --- a/src/thread/pthread_setschedparam.c +++ b/src/thread/pthread_setschedparam.c @@ -3,8 +3,8 @@ int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param) { int r; - __lock(t->killlock); + LOCK(t->killlock); r = t->dead ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param); - __unlock(t->killlock); + UNLOCK(t->killlock); return r; } diff --git a/src/thread/pthread_setschedprio.c b/src/thread/pthread_setschedprio.c index e0bdc03b8405c2f8938bbf557b933e375e9dce81..dc745b42a4616adfb23a7c6e8916d740b8e500ba 100644 --- a/src/thread/pthread_setschedprio.c +++ b/src/thread/pthread_setschedprio.c @@ -3,8 +3,8 @@ int pthread_setschedprio(pthread_t t, int prio) { int r; - __lock(t->killlock); + LOCK(t->killlock); r = t->dead ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, &prio); - __unlock(t->killlock); + UNLOCK(t->killlock); return r; }