Author: dchagin
Date: Sun May 24 14:54:12 2015
New Revision: 283384
URL: https://svnweb.freebsd.org/changeset/base/283384

Log:
  pthread_join() caller do futex_wait on child_clear_tid. As a results
  of multiple simultaneous calls to pthread_join() specifying the same
  target thread are undefined wake up the one thread.
  
  Differential Revision:        https://reviews.freebsd.org/D1040

Modified:
  head/sys/compat/linux/linux_emul.c

Modified: head/sys/compat/linux/linux_emul.c
==============================================================================
--- head/sys/compat/linux/linux_emul.c  Sun May 24 14:53:16 2015        
(r283383)
+++ head/sys/compat/linux/linux_emul.c  Sun May 24 14:54:12 2015        
(r283384)
@@ -270,7 +270,7 @@ linux_thread_detach(struct thread *td)
 
                cup.uaddr = child_clear_tid;
                cup.op = LINUX_FUTEX_WAKE;
-               cup.val = 0x7fffffff;   /* Awake everyone */
+               cup.val = 1;            /* wake one */
                cup.timeout = NULL;
                cup.uaddr2 = NULL;
                cup.val3 = 0;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to