PERFORCE change 101643 for review
John Baldwin
jhb at freebsd.org
Mon Jul 17 16:25:58 UTC 2006
On Saturday 15 July 2006 10:35, Divacky Roman wrote:
> On Sat, Jul 15, 2006 at 10:03:28AM -0400, John Baldwin wrote:
> > On Saturday 15 July 2006 05:05, Roman Divacky wrote:
> > > http://perforce.freebsd.org/chv.cgi?CH=101643
> > >
> > > Change 101643 by rdivacky at rdivacky_witten on 2006/07/15 09:04:22
> > >
> > > Several things at once:
> > >
> > > o Change process_exit and process_exec function handlers prototype
> > > to include struct image_params arg.
> >
> > Why did you add it to process_exit()? exit() doesn't have an imgp to
> > pass, so this doesn't make sense. If you are doing it so you can use
> > the same function for both, then use a wrapper in the exit() case or some
> > such.
>
> because most users of process_exec eventhandler use the same function both
> for process_exit and process_exec. I didnt know how to solve that otherwise.
> in the process_exit case I pass in NULL and I change all the other users to
>
> foo(void *arg, struct proc *p, struct image_params *imgp __unused)
>
> if its not ok tell me how to change that
I don't think it's clean design wise. I think you should fix all the other
places to register a different function for the exec/exit cases. One can
just be a wrapper for the other (e.g. have the exec one just ignore the imgp
and call the exit one).
--
John Baldwin
More information about the p4-projects
mailing list