From owner-p4-projects@FreeBSD.ORG Thu Aug 17 08:12:09 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 B600216A4E1; Thu, 17 Aug 2006 08:12:09 +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 77EA016A4DA for ; Thu, 17 Aug 2006 08:12:09 +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 47ADD43D58 for ; Thu, 17 Aug 2006 08:12:09 +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 k7H8C9D2005175 for ; Thu, 17 Aug 2006 08:12:09 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7H8C9k2005172 for perforce@freebsd.org; Thu, 17 Aug 2006 08:12:09 GMT (envelope-from rdivacky@FreeBSD.org) Date: Thu, 17 Aug 2006 08:12:09 GMT Message-Id: <200608170812.k7H8C9k2005172@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 104364 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, 17 Aug 2006 08:12:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=104364 Change 104364 by rdivacky@rdivacky_witten on 2006/08/17 08:11:24 Sync with src in amd64ficition + amd64fy exit_group. Change the getpid() in amd64 version to lock the proc. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#22 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#22 (text+ko) ==== @@ -1331,6 +1331,7 @@ int linux_getpid(struct thread *td, struct linux_getpid_args *args) { +#ifdef __i386__ struct linux_emuldata *em; char osrel[LINUX_MAX_UTSNAME]; @@ -1345,6 +1346,11 @@ td->td_retval[0] = td->td_proc->p_pid; PROC_UNLOCK(td->td_proc); } +#else + PROC_LOCK(td->td_proc); + td->td_retval[0] = td->td_proc->p_pid; + PROC_UNLOCK(td->td_proc); +#endif return (0); } @@ -1364,6 +1370,7 @@ int linux_getppid(struct thread *td, struct linux_getppid_args *args) { +#ifdef __i386__ struct linux_emuldata *em; struct proc *p, *pp; char osrel[LINUX_MAX_UTSNAME]; @@ -1405,6 +1412,9 @@ EMUL_UNLOCK(&emul_lock); PROC_UNLOCK(pp); +#else + return getppid(td, (struct getppid_args *) args); +#endif return (0); } @@ -1471,6 +1481,7 @@ int linux_exit_group(struct thread *td, struct linux_exit_group_args *args) { +#ifdef __i386__ struct linux_emuldata *em, *td_em, *tmp_em; struct proc *sp; char osrel[LINUX_MAX_UTSNAME]; @@ -1502,6 +1513,7 @@ EMUL_SHARED_RUNLOCK(&emul_shared_lock); EMUL_UNLOCK(&emul_lock); } +#endif exit1(td, W_EXITCODE(args->error_code,0));