From owner-cvs-all Tue Feb 6 10:55:37 2001 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 2609C37B401; Tue, 6 Feb 2001 10:55:11 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f16ItAB36765; Tue, 6 Feb 2001 19:55:10 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Peter Wemm Cc: Garrett Wollman , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/awi awi.c src/sys/dev/ed if_ed.c src/sys/dev/fe if_fe.c src/sys/dev/ie if_ie.c src/sys/dev/lnc if_lnc.c src/sys/dev/pdq pdq_ifsubr.c src/sys/dev/ray if_ray.c src/sys/dev/sn if_sn.c src/sys/dev/snc dp83932.c src/sys/dev/usb ... In-Reply-To: Your message of "Tue, 06 Feb 2001 10:27:52 PST." <200102061827.f16IRqt49819@mobile.wemm.org> Date: Tue, 06 Feb 2001 19:55:10 +0100 Message-ID: <36763.981485710@critter> From: Poul-Henning Kamp Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200102061827.f16IRqt49819@mobile.wemm.org>, Peter Wemm writes: >TAILQ_PREV is only nasty because of a HORRIBLE hack. There is no structure >for the tailq entry nodes, so it abuses the head structure definition. >TAILQ_PREV can be quite easily be fixed to not need to do this abuse if >we put a differient hack in another place. LIST_PREV can do the same thing >without needing a head structure.. But it will need to know what the head >of the list is so that it can detect when it hits it. I already said that. That would make the LIST_PREV rather inconvenient, and in all but a few cases, would mean that the size of the pointer your saved in the _HEAD structure will be spent several times over compensating for it's absense, in the process making LIST_PREV unusable for the case where you don't know what head a particular element is hung from. As I see it now: If I have many _HEAD's (as in a hash table), LIST can save me a little space. All other cases: use TAILQ. -- 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 cvs-all" in the body of the message