Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2015 14:54:13 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283384 - head/sys/compat/linux
Message-ID:  <201505241454.t4OEsDXX034570@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505241454.t4OEsDXX034570>