From owner-cvs-all Thu Dec 20 13:20:31 2001 Delivered-To: cvs-all@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id ECF8A37B423; Thu, 20 Dec 2001 13:20:09 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20011220212009.JGSA19716.rwcrmhc51.attbi.com@InterJet.elischer.org>; Thu, 20 Dec 2001 21:20:09 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA52876; Thu, 20 Dec 2001 13:12:45 -0800 (PST) Date: Thu, 20 Dec 2001 13:12:44 -0800 (PST) From: Julian Elischer To: Poul-Henning Kamp Cc: Bruce Evans , Peter Wemm , 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 In-Reply-To: <667.1008876572@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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