]> sourceware.org Git - glibc.git/commitdiff
htl: Make joining self return EDEADLK
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 10 Feb 2020 01:19:00 +0000 (01:19 +0000)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 10 Feb 2020 01:19:00 +0000 (01:19 +0000)
htl/pt-join.c

index 43878a3d527c9ad9c7c7812c6fea60c805ee7fa8..ab77af52c1c3662a28e3471e2ca4f6dfd7dc9e85 100644 (file)
@@ -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)
This page took 0.039523 seconds and 5 git commands to generate.