This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[hurd,commited] htl: Avoid a local plt for pthread_self
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: libc-alpha at sourceware dot org
- Cc: Samuel Thibault <samuel dot thibault at ens-lyon dot org>, commit-hurd at gnu dot org
- Date: Mon, 10 Feb 2020 13:23:35 +0100
- Subject: [hurd,commited] htl: Avoid a local plt for pthread_self
---
htl/pt-join.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htl/pt-join.c b/htl/pt-join.c
index ab77af52c1..ecb79e7c49 100644
--- a/htl/pt-join.c
+++ b/htl/pt-join.c
@@ -30,14 +30,14 @@ __pthread_join (pthread_t thread, void **status)
struct __pthread *pthread;
int err = 0;
- if (thread == pthread_self ())
- return EDEADLK;
-
/* Lookup the thread structure for THREAD. */
pthread = __pthread_getid (thread);
if (pthread == NULL)
return ESRCH;
+ if (pthread == _pthread_self ())
+ return EDEADLK;
+
__pthread_mutex_lock (&pthread->state_lock);
pthread_cleanup_push ((void (*)(void *)) __pthread_mutex_unlock,
&pthread->state_lock);
--
2.24.1