svn commit: r322720 - head/sys/amd64/amd64

Konstantin Belousov kostikbel at gmail.com
Sun Aug 20 11:19:03 UTC 2017


On Sun, Aug 20, 2017 at 12:42:01PM +0200, Oliver Pinter wrote:
> > @@ -412,8 +407,8 @@ trap(struct trapframe *frame)
> >                         fill_frame_regs(frame, &regs);
> >                         if (dtrace_return_probe_ptr != NULL &&
> >                             dtrace_return_probe_ptr(&regs) == 0)
> > -                               goto out;
> > -                       goto userout;
> > +                               return;
> > +                       return;
> 
> 
> This part of code - the double return - looks weird. Probably it was left
> here to document the original "behavior".

Indeed it is weird.

I think that the original code was written at the time when userout and out
were different return paths.  Another possibility was that it actually
wanted to do goto userret instead of goto userout, i.e. to call userret()
before returning to usermode.

Anyway, I cleaned this up without changing the algorithm.


More information about the svn-src-all mailing list