Date: Fri, 04 Jan 2008 17:12:59 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: John Baldwin <jhb@freebsd.org> Cc: Julian Elischer <julian@elischer.org>, freebsd-arch@freebsd.org Subject: Re: RFC: sysctl additional functions/macros Message-ID: <6795.1199466779@critter.freebsd.dk> In-Reply-To: Your message of "Fri, 04 Jan 2008 11:50:49 EST." <200801041150.49541.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200801041150.49541.jhb@freebsd.org>, John Baldwin writes: >On Friday 04 January 2008 11:18:29 am Poul-Henning Kamp wrote: >> In message <477E592B.9040106@elischer.org>, Julian Elischer writes: >> >John Baldwin wrote: >> >> >right, so you've solved that one.. >> >> Please no! >> >> This is far more complicated and wasteful than it needs to be. >> >> Please just include the code in the macro call and instantiate >> a function with that code inlined. > >Your code body in the example though is the just the validation step, it >doesn't have all the copyin/copyout goop (nor should it). Of course not, the SYSCTL_INT_CODE() macro should instantiate that in the new function. >Are you really >worried about the overhead of having a worker function call a function >containing the validation code? No, I'm appalled at another clutch of weird data structures to encapsulate what is really a piece of code as a number of weird fields. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6795.1199466779>