Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jan 2001 11:25:08 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        John Baldwin <jhb@FreeBSD.ORG>, current@FreeBSD.ORG
Subject:   Re: Current hangs... 
Message-ID:  <36402.978344708@critter>
In-Reply-To: Your message of "Sun, 31 Dec 2000 18:04:50 PST." <200101010204.f0124oW47215@earth.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200101010204.f0124oW47215@earth.backplane.com>, Matt Dillon writes:
>:
>:Why not this:
>:
>:s = splbio();
>:TAILQ_FOREACH(bp, &vp->v_dirtyblkhd, b_vnbufs) {
>
>    First rule when making simple bug fixes by copying working code from one
>    source file to another is:  Dont try to optimize the code on the
>    fly.
>
>    Personally speaking, I don't find the FOREACH macros any more readable
>    vs an explicit for loop.  They hide too much... like for example the
>    fact that you are dependant on the current pointer remaining valid to
>    get the next pointer in the loop.


Is that any different from

	for (i = 0; i < N; i++) {
		bla;
	}
	
?
	
--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36402.978344708>