On Wed, Jan 15, 2020 at 09:51:02AM +0100, Hans Petter Selasky wrote:
H> On 2020-01-15 07:10, Gleb Smirnoff wrote:
H> > I really want to reverse the argument order of epoch_call() as well.
H> > The current order is really backwards:
H> > 
H> >       void
H> >       epoch_call(epoch_t epoch, epoch_context_t ctx,
H> >           void (*callback)(epoch_context_t));
H> > 
H> > Suggested declaration is:
H> > 
H> >       void
H> >       epoch_call(epoch_t epoch, epoch_context_t ctx,
H> >          void (*callback)(epoch_context_t));
H> 
H> I think he meant to put the ctx argument last. Look at how the function 
H> is implemented to see if that makes any sense, I.E. how arguments are 
H> optimised.

Yes, of course. I had too little tea last night and didn't swap
arguments after copy-n-paste. Suggested prototype is:

     void
     epoch_call(epoch_t epoch, void (*callback)(epoch_context_t),
        epoch_context_t ctx);

H> Is this *want* just because of "function, argument" is better than 
H> "argument, function" ?

Sure. There is no practical impact on how a CPU will execute. It is
all about how a human reads a code.

-- 
Gleb Smirnoff
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to