From owner-p4-projects@FreeBSD.ORG Thu Jul 6 12:02:08 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 45DEE16A4E2; Thu, 6 Jul 2006 12:02:08 +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 F30F716A4DA; Thu, 6 Jul 2006 12:02:07 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D954343D49; Thu, 6 Jul 2006 12:01:57 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k66C1qoi028651 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 6 Jul 2006 14:01:52 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k66C1qaO028650; Thu, 6 Jul 2006 14:01:52 +0200 (CEST) Date: Thu, 6 Jul 2006 14:01:52 +0200 From: Divacky Roman To: John Baldwin Message-ID: <20060706120152.GA28505@stud.fit.vutbr.cz> References: <200607061105.k66B5JKG065286@repoman.freebsd.org> <200607060744.55037.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200607060744.55037.jhb@freebsd.org> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: Perforce Change Reviews Subject: Re: PERFORCE change 100719 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, 06 Jul 2006 12:02:08 -0000 > > + /* we have to call linux exit hook */ > > + if (p->p_flag & P_LINUX && linux_proc_exit_p != NULL) > > + (linux_proc_exit_p)(td); > > MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage), > > M_ZOMBIE, M_WAITOK); > > /* > > > > Please use a 'process_exit' eventhandler instead. You can test P_LINUX in > your handler and return right away for non-Linux procs. oh.. didnt notice.. thnx for telling me > > + /* linux userret */ > > + if (p->p_flag & P_LINUX && linux_userret_p != NULL) > > + (linux_userret_p)(td); > > + > > /* > > * Let the scheduler adjust our priority etc. > > */ > > > > If it is needed we can add a new 'thread_userret' eventhandler rather than > putting Linux-specific hooks into the code. sounds ok > > ==== //depot/projects/soc2006/rdivacky_linuxolator/sys/proc.h#2 (text+ko) ==== > > > > @@ -655,6 +655,7 @@ > > #define P_HWPMC 0x800000 /* Process is using HWPMCs */ > > > > #define P_JAILED 0x1000000 /* Process is in jail. */ > > +#define P_LINUX 0x2000000 /* linux binary */ > > #define P_INEXEC 0x4000000 /* Process is in execve(). */ > > #define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ > > If you do the two above, then you might be able to come up with another test > (compare p_sysvec?) instead of needing this flag since the only tests of it > would be in the emulator code itself. yes.. it does not seem necessary now. what is p_sysvec? anyway - the code I commited has many issues I hope to fix soon (in hours) take this as WIP.