On 01-Jan-01 Matt Dillon wrote:
>:
>: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.
That works.
> 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.
Erm, I find one succint line easier to read than something sprawled across 2-3
lines of code. Also, I was never under the assumption that you could do a
*_FOREACH() loop while the list changed out from under you. I doubt anyone
else is either. :)
> -Matt
--
John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message