public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] htl: Avoid a local plt for pthread_self
@ 2020-02-10 12:23 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-02-10 12:23 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1433e270a16442ae9a86dc749d9cbd5e1f55405d
commit 1433e270a16442ae9a86dc749d9cbd5e1f55405d
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Mon Feb 10 13:22:31 2020 +0100
htl: Avoid a local plt for pthread_self
Diff:
---
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 ab77af5..ecb79e7 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-10 12:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 12:23 [glibc] htl: Avoid a local plt for pthread_self Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).