1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

htl: Avoid a local plt for pthread_self

This commit is contained in:
Samuel Thibault
2020-02-10 13:22:31 +01:00
parent c0463e8b79
commit 1433e270a1

View File

@@ -30,14 +30,14 @@ __pthread_join (pthread_t thread, void **status)
struct __pthread *pthread; struct __pthread *pthread;
int err = 0; int err = 0;
if (thread == pthread_self ())
return EDEADLK;
/* Lookup the thread structure for THREAD. */ /* Lookup the thread structure for THREAD. */
pthread = __pthread_getid (thread); pthread = __pthread_getid (thread);
if (pthread == NULL) if (pthread == NULL)
return ESRCH; return ESRCH;
if (pthread == _pthread_self ())
return EDEADLK;
__pthread_mutex_lock (&pthread->state_lock); __pthread_mutex_lock (&pthread->state_lock);
pthread_cleanup_push ((void (*)(void *)) __pthread_mutex_unlock, pthread_cleanup_push ((void (*)(void *)) __pthread_mutex_unlock,
&pthread->state_lock); &pthread->state_lock);