From owner-p4-projects@FreeBSD.ORG Sun Jul 9 09:35:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA73916A4E2; Sun, 9 Jul 2006 09:35:56 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EE0316A4E0 for ; Sun, 9 Jul 2006 09:35:56 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3973043D45 for ; Sun, 9 Jul 2006 09:35:56 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k699ZuUs083619 for ; Sun, 9 Jul 2006 09:35:56 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k699Zu8s083616 for perforce@freebsd.org; Sun, 9 Jul 2006 09:35:56 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 9 Jul 2006 09:35:56 GMT Message-Id: <200607090935.k699Zu8s083616@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 101086 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jul 2006 09:35:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=101086 Change 101086 by rdivacky@rdivacky_witten on 2006/07/09 09:35:12 Wakeup all blocked threads waiting for a futex in proc_exit() hook. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#12 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#12 (text+ko) ==== @@ -56,6 +56,7 @@ #include #include +#include #include #include #include @@ -1164,6 +1165,7 @@ } #endif if (em->clear_tid != NULL) { + struct linux_sys_futex_args cup; int null = 0; error = copyout(&null, em->clear_tid, sizeof(null)); @@ -1172,7 +1174,16 @@ return (error); } - /* TODO: futexes stuff */ + /* futexes stuff */ + cup.uaddr = em->clear_tid; + cup.op = LINUX_FUTEX_WAKE; + cup.val = 0x7fffffff; /* Awake everyone */ + cup.timeout = NULL; + cup.uaddr2 = NULL; + cup.val3 = 0; + error = linux_sys_futex(td, &cup); + if (error) + printf("futex stuff in proc_exit failed.\n"); } EMUL_RUNLOCK(&emul_lock);