Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2001 10:55:38 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc:        =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>, Jake Burkholder <jake@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Bruce Evans <bde@zeta.org.au>
Subject:   Re: cvs commit: src/sys/alpha/alpha interrupt.c machdep.c mp_mac
Message-ID:  <XFMail.010111105538.jhb@FreeBSD.org>
In-Reply-To: <200101111845.f0BIjBs35569@aslan.scsiguy.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 11-Jan-01 Justin T. Gibbs wrote:
>>> Anyone touching these variables had better understand what they are for
>>> and how they operate.  I think our developers are smart enough to
>>> understand
>>> this without ugly upper-case macros.  Heck "errno" is not spelled
>>> PTHREAD_GET(errno), or PTHREAD_SET(errno, error) and still people seem
>>> to be able to write useful threaded apps. 8-)
>>
>>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?

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.

2) Go memorize all aforementioned headers to know that these variables are
magic.

I prefer the interface 1) for this.  Do you prefer 2)?

> --
> Justin

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


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?XFMail.010111105538.jhb>