diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-10 01:19:00 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-10 01:19:00 +0000 |
commit | 1905cf47bcfb53d9f7e640db83e43bbe32f9fa4a (patch) | |
tree | 9330748dd804f8cb80a72c5cf6b3a71851c54afb /htl | |
parent | pthread: Move most barrier tests from nptl to sysdeps/pthread (diff) | |
download | glibc-1905cf47bcfb53d9f7e640db83e43bbe32f9fa4a.tar.gz glibc-1905cf47bcfb53d9f7e640db83e43bbe32f9fa4a.tar.bz2 glibc-1905cf47bcfb53d9f7e640db83e43bbe32f9fa4a.zip |
htl: Make joining self return EDEADLK
Diffstat (limited to 'htl')
-rw-r--r-- | htl/pt-join.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/htl/pt-join.c b/htl/pt-join.c index 43878a3d52..ab77af52c1 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -30,6 +30,9 @@ __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) |