From owner-freebsd-current Mon Jan 1 2:25:19 2001 From owner-freebsd-current@FreeBSD.ORG Mon Jan 1 02:25:17 2001 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 876A137B400; Mon, 1 Jan 2001 02:25:16 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f01AP9q36404; Mon, 1 Jan 2001 11:25:09 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Matt Dillon Cc: John Baldwin , current@FreeBSD.ORG Subject: Re: Current hangs... In-Reply-To: Your message of "Sun, 31 Dec 2000 18:04:50 PST." <200101010204.f0124oW47215@earth.backplane.com> Date: Mon, 01 Jan 2001 11:25:08 +0100 Message-ID: <36402.978344708@critter> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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