aboutsummaryrefslogtreecommitdiff
path: root/htl
diff options
context:
space:
mode:
Diffstat (limited to 'htl')
-rw-r--r--htl/pt-join.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/htl/pt-join.c b/htl/pt-join.c
index 43878a3..ab77af5 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)