summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-01-09 15:17:34 +0000
committerdchagin <dchagin@FreeBSD.org>2016-01-09 15:17:34 +0000
commitef31cbb1ccac3b8850d62afdfc5565527587652e (patch)
treef040bba1ad5365ab5c7cf323bff81f16b0ead8eb
parentcb3b38d1640b6a07cdc16de9cc37c2da8cfff4c1 (diff)
downloadFreeBSD-src-ef31cbb1ccac3b8850d62afdfc5565527587652e.zip
FreeBSD-src-ef31cbb1ccac3b8850d62afdfc5565527587652e.tar.gz
MFC r283384:
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.
-rw-r--r--sys/compat/linux/linux_emul.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c
index 887f72e..aaead8d 100644
--- a/sys/compat/linux/linux_emul.c
+++ b/sys/compat/linux/linux_emul.c
@@ -271,7 +271,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;
OpenPOWER on IntegriCloud