Date: Thu, 20 Dec 2001 13:12:44 -0800 (PST) From: Julian Elischer <julian@elischer.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Bruce Evans <bde@zeta.org.au>, 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.c src/sys/ia64/ia64 pmap.c Message-ID: <Pine.BSF.4.21.0112201306470.46573-100000@InterJet.elischer.org> In-Reply-To: <667.1008876572@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 20 Dec 2001, Poul-Henning Kamp wrote: > In message <20011221005726.Q884-100000@gamplex.bde.org>, Bruce Evans writes: > >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. > > This is an improvement IMO. Please use whatever means we have to > improve readability of our source code. > for my own purposes I tend to define an iterator for each kind of queue I have, e.g. FOREACH_PROC_IN_SYSTEM(p) and FOREACH_THREAD_IN_PROC(p, td) because then I can change them everywhere easily and I think it's easier to read than TAILQ_FOREACH(p, &allprocs, p_procq) {} JM2cW 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.0112201306470.46573-100000>