From owner-p4-projects@FreeBSD.ORG Thu Jul 20 13:11:06 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 0932916A4EC; Thu, 20 Jul 2006 13:11:06 +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 BDCFC16A4E6 for ; Thu, 20 Jul 2006 13:11:05 +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 89C7C43D45 for ; Thu, 20 Jul 2006 13:11:05 +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 k6KDB5cO002639 for ; Thu, 20 Jul 2006 13:11:05 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6KDB5gH002636 for perforce@freebsd.org; Thu, 20 Jul 2006 13:11:05 GMT (envelope-from rdivacky@FreeBSD.org) Date: Thu, 20 Jul 2006 13:11:05 GMT Message-Id: <200607201311.k6KDB5gH002636@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 101992 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: Thu, 20 Jul 2006 13:11:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=101992 Change 101992 by rdivacky@rdivacky_witten on 2006/07/20 13:10:53 Changes: o CLEARTID/SETTID swap just like linux does it. NetBSD differs here. o in the linux binary execs to fbsd binary case remove the emuldata from the list and unlock the lock. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#18 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#18 (text+ko) ==== @@ -447,15 +447,15 @@ } } + if (args->flags & CLONE_CHILD_SETTID) + em->child_set_tid = args->child_tidptr; + else + em->child_set_tid = NULL; + if (args->flags & CLONE_CHILD_CLEARTID) em->child_clear_tid = args->child_tidptr; else em->child_clear_tid = NULL; - - if (args->flags & CLONE_CHILD_SETTID) - em->child_set_tid = args->child_tidptr; - else - em->child_set_tid = NULL; EMUL_RUNLOCK(&emul_lock); if (args->flags & CLONE_SETTLS) { @@ -1216,6 +1216,16 @@ #endif return; } + + EMUL_RUNLOCK(&emul_lock); + /* XXX: there is a race but I think we can ommit that + * because its not very possible that the same process + * will exit on different cpus etc. + */ + EMUL_WLOCK(&emul_lock); + SLIST_REMOVE(&emuldata_head, em, linux_emuldata, emuldatas); + EMUL_WUNLOCK(&emul_lock); + FREE(em, M_LINUX); } }