Date: Thu, 6 Jul 2006 14:01:52 +0200 From: Divacky Roman <xdivac02@stud.fit.vutbr.cz> To: John Baldwin <jhb@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 100719 for review Message-ID: <20060706120152.GA28505@stud.fit.vutbr.cz> In-Reply-To: <200607060744.55037.jhb@freebsd.org> References: <200607061105.k66B5JKG065286@repoman.freebsd.org> <200607060744.55037.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> > + /* 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060706120152.GA28505>