From owner-svn-src-head@FreeBSD.ORG Wed Feb 18 16:11:40 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 527351065672; Wed, 18 Feb 2009 16:11:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25D9E8FC23; Wed, 18 Feb 2009 16:11:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1IGBeZp068461; Wed, 18 Feb 2009 16:11:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1IGBdcK068459; Wed, 18 Feb 2009 16:11:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200902181611.n1IGBdcK068459@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 18 Feb 2009 16:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188750 - in head/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2009 16:11:41 -0000 Author: kib Date: Wed Feb 18 16:11:39 2009 New Revision: 188750 URL: http://svn.freebsd.org/changeset/base/188750 Log: Adapt linux emulation to use cv for vfork wait. Submitted by: Takahiro Kurosawa PR: kern/131506 Modified: head/sys/amd64/linux32/linux32_machdep.c head/sys/i386/linux/linux_machdep.c Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Wed Feb 18 10:02:32 2009 (r188749) +++ head/sys/amd64/linux32/linux32_machdep.c Wed Feb 18 16:11:39 2009 (r188750) @@ -560,7 +560,7 @@ linux_vfork(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); return (0); @@ -749,7 +749,7 @@ linux_clone(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); } Modified: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Wed Feb 18 10:02:32 2009 (r188749) +++ head/sys/i386/linux/linux_machdep.c Wed Feb 18 16:11:39 2009 (r188750) @@ -376,7 +376,7 @@ linux_vfork(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); return (0); @@ -581,7 +581,7 @@ linux_clone(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); }