Date: Mon, 09 Aug 2010 10:02:12 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Ivan Voras <ivoras@freebsd.org> Cc: freebsd-hackers@freebsd.org, Garrett Cooper <gcooper@freebsd.org> Subject: Re: Why is TUNABLE_INT discouraged? Message-ID: <86aaowuscb.fsf@ds4.des.no> In-Reply-To: <AANLkTinraF50O%2Bcp_h1m6TODnoz_7R3WXfjTanh-86mn@mail.gmail.com> (Ivan Voras's message of "Sun, 8 Aug 2010 01:30:19 %2B0200") References: <AANLkTinKaiGFhKRgqQ%2BFjm=02VfWCxULe0a68y-PkJx6@mail.gmail.com> <86fwyq8rsc.fsf@ds4.des.no> <i3kbis$73l$1@dough.gmane.org> <86d3tujh72.fsf@ds4.des.no> <AANLkTi=puD%2B-WeZ%2BFGdtZtw1v%2BNnGD_htwNa%2BEn9fcML@mail.gmail.com> <864of680wv.fsf@ds4.des.no> <AANLkTinraF50O%2Bcp_h1m6TODnoz_7R3WXfjTanh-86mn@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras <ivoras@freebsd.org> writes: > Dag-Erling Sm=C3=B8rgrav <des@des.no> writes: > > Not sure what you mean. The original issue was that someone had used > > TUNABLE_INT() for something that was actually a memory address. I > > changed it to TUNABLE_ULONG(). Of course, if your tunable is a boolean > > value or something like maxprocs, an int is fine - but so is a long. > Semantically valid but using TUNABLE_INT to hold pointers is a > developer bug, not the fault of the API, and there's nothing wrong > with "int" as a data type in this context. That's the point. There was no TUNABLE_ULONG() at the time. I added it to fix the bug. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86aaowuscb.fsf>