Date: Fri, 12 Jan 2001 10:13:36 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: John Baldwin <jhb@FreeBSD.org> Cc: "Justin T. Gibbs" <gibbs@scsiguy.com>, =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>, =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>, Jake Burkholder <jake@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/alpha interrupt.c machdep.c mp_mac Message-ID: <Pine.BSF.4.21.0101121002140.2011-100000@besplex.bde.org> In-Reply-To: <XFMail.010111105538.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 11 Jan 2001, John Baldwin wrote: > On 11-Jan-01 Justin T. Gibbs wrote: > >>Erm, I didn't know that all developers that ever touched the kernel needed to > >>memorize all the various MD header files machine/globals.h and > >>machine/globaldata.h for _each_ architecture. I guess we want the learning > >>curve so high that no one else can submit code? :-P > > > > That is an implementation complaint, not an interface complaint. I > > thought we were discussing the interface? I certainly was. I shouldn't have mentioned optimization (it is one of the regressions in the implementation. The old implementation could have been much simpler if it didn't have optimizations). > These variables are magic. A developer can find out that they are magic in one > of two ways: > > 1) Use a special macro that acknowledges that they are magic, and have the > compile break if they don't so that they know there is something they need to > take into account. lvalue-like macros aren't much more magic than any other variables. Users of the variables can't tell the difference without peeking at the implementation or undef'ing the varabiables. > 2) Go memorize all aforementioned headers to know that these variables are > magic. > > I prefer the interface 1) for this. Do you prefer 2)? Any magicness in the interface (e.g., the cpuid changing underneath you) can probably be expressed by declaring the variables volatile (if they are implemented as variables; if they are implemented as magic() or *magic() then they are automatically volatile). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101121002140.2011-100000>