diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-10 13:22:31 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-10 13:22:56 +0100 |
commit | 1433e270a16442ae9a86dc749d9cbd5e1f55405d (patch) | |
tree | 459d0d9f773212d34627423f8f38c1231d3aef1c /htl | |
parent | c0463e8b79ca650b60badc5b9c0d574b91aa8d01 (diff) | |
download | glibc-1433e270a16442ae9a86dc749d9cbd5e1f55405d.zip glibc-1433e270a16442ae9a86dc749d9cbd5e1f55405d.tar.gz glibc-1433e270a16442ae9a86dc749d9cbd5e1f55405d.tar.bz2 |
htl: Avoid a local plt for pthread_self
Diffstat (limited to 'htl')
-rw-r--r-- | htl/pt-join.c | 6 |
1 files 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); |