From e2a838697261bbf29d13ae085533517d7b889436 Mon Sep 17 00:00:00 2001 From: dchagin Date: Sun, 24 May 2015 14:54:12 +0000 Subject: 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 --- sys/compat/linux/linux_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_emul.c') diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index 6d88d7b..502e936 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -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; -- cgit v1.1