On Fri, Jul 08, 2011 at 04:40:16AM -0400, Ted Unangst wrote:
> On Fri, Jul 08, 2011, Paul Irofti wrote:
> > On Fri, Jul 08, 2011 at 01:35:18AM -0400, Ted Unangst wrote:
> >> I don't think we're ever going to support different threads of a process
> >> running with different emulations, so move p_emul and p_emuldata to
> >> struct process.  This uses the p__pgid kinfo_proc hack to allow p_emul
> >> to remain as a macro so I don't have to rewrite half the kernel.
> 
> >> diff -u -p -r1.34 linux_exec.c
> >> --- sys/compat/linux/linux_exec.c  20 Apr 2011 19:14:34 -0000      1.34
> >> +++ sys/compat/linux/linux_exec.c  8 Jul 2011 05:21:56 -0000
> >> @@ -198,7 +198,7 @@ void
> >>  linux_e_proc_fork(struct proc *p, struct proc *parent)
> >>  {
> >>    struct linux_emuldata *emul;
> >> -  struct linux_emuldata *p_emul;
> >> +  struct linux_emuldata *pp_emul;
> > 
> > Any reason you want to touch this? It looks like s/p_emul/pp_emul/.
> 
> There is a macro named p_emul, now, so no more variables of that name.
> See below.

Ah, I really don't like this. Its confusing.

Later in the game you use stuff like p__emul and (p)->p_emul in the same
line which is again a pitfall.

> 
> >> -  struct  emul *p_emul;           /* Emulation information */
> >> +#define p_emul p_p->ps_emul

Reply via email to