From owner-cvs-all Thu Dec 20 13:39: 0 2001 Delivered-To: cvs-all@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id 2C4E837B419; Thu, 20 Dec 2001 13:38:44 -0800 (PST) Received: from peter3.wemm.org ([12.232.27.13]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20011220213844.HWNG6450.rwcrmhc52.attbi.com@peter3.wemm.org>; Thu, 20 Dec 2001 21:38:44 +0000 Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id fBKLchs79110; Thu, 20 Dec 2001 13:38:43 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id AD35039F0; Thu, 20 Dec 2001 13:38:43 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Poul-Henning Kamp Cc: Bruce Evans , 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> Date: Thu, 20 Dec 2001 13:38:43 -0800 From: Peter Wemm Message-Id: <20011220213843.AD35039F0@overcee.netplex.com.au> 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 Poul-Henning Kamp wrote: > In message <20011221005726.Q884-100000@gamplex.bde.org>, Bruce Evans writes: > >On Wed, 19 Dec 2001, Peter Wemm wrote: > > > >> peter 2001/12/19 21:29:59 PST > >> > >> Modified files: > >> sys/alpha/alpha pmap.c > >> sys/i386/i386 pmap.c > >> sys/ia64/ia64 pmap.c > >> Log: > >> 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) { > >> > >> Revision Changes Path > >> 1.79 +9 -28 src/sys/alpha/alpha/pmap.c > >> 1.301 +6 -20 src/sys/i386/i386/pmap.c > >> 1.41 +10 -30 src/sys/ia64/ia64/pmap.c > > > >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. Well, the indentation was messed up beforehand, so fixing it required touching it. I actually like these particular ones because it helps distinguish the standard iterator loops from those that modify the items and have to preload the 'next' value. eg: for (pv = TAILQ_FIRST(&m->md.pv_list); pv; pv = npv) { npv = TAILQ_NEXT(pv, pv_list); do_stuff(); } Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message