Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2001 09:50:53 -0600
From:      Alfred Perlstein <bright@mu.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Maxim Sobolev <sobomax@FreeBSD.org>, Peter Wemm <peter@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/alpha/alpha pmap.c src/sys/i386/i386 pmap.csrc/sys/ia64/ia64 pmap.c
Message-ID:  <20011220095053.C48837@elvis.mu.org>
In-Reply-To: <20011221014329.O1630-100000@gamplex.bde.org>; from bde@zeta.org.au on Fri, Dec 21, 2001 at 01:46:50AM %2B1100
References:  <3C21F2F1.542EE5CC@FreeBSD.org> <20011221014329.O1630-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Bruce Evans <bde@zeta.org.au> [011220 08:47] wrote:
> On Thu, 20 Dec 2001, Maxim Sobolev wrote:
> 
> > > On Wed, 19 Dec 2001, Peter Wemm wrote:
> > > >...
> > > >   Replace a bunch of:
> > > >         for (pv = TAILQ_FIRST(&m->md.pv_list);
> > > >                  pv;
> > > >                  pv = TAILQ_NEXT(pv, pv_list)) {
> > > >   with:
> > > >         TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) {
> > > >...
> > > This is a regression IMO.  Please write C programs in something
> > > resembling C.
> >
> > Why then we have all those *_FOREACH macros in sys/queue.h?
> 
> Opinions differ, and mine aren't quite strong enough to back out the
> commit that added *_FOREACH.

I agree that the FOREACH macros are semi-gross, however they really
seem to clarify the code, they reduce the lines as well as make it
very clear what the loop's intent is.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
                           http://www.morons.org/rants/gpl-harmful.php3

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?20011220095053.C48837>