From owner-cvs-all Tue Feb 6 9:15:54 2001 Delivered-To: cvs-all@freebsd.org Received: from syncopation-03.iinet.net.au (syncopation-03.iinet.net.au [203.59.24.49]) by hub.freebsd.org (Postfix) with SMTP id 6840237B4EC for ; Tue, 6 Feb 2001 09:15:23 -0800 (PST) Received: (qmail 30565 invoked by uid 666); 6 Feb 2001 17:23:00 -0000 Received: from reggae-14-23.nv.iinet.net.au (HELO elischer.org) (203.59.77.23) by mail.m.iinet.net.au with SMTP; 6 Feb 2001 17:23:00 -0000 Message-ID: <3A8022F4.312A0F64@elischer.org> Date: Tue, 06 Feb 2001 08:14:44 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Poul-Henning Kamp Cc: Peter Wemm , 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 ... References: <35662.981479283@critter> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Poul-Henning Kamp wrote: > > In message <200102061704.f16H4ct48889@mobile.wemm.org>, Peter Wemm writes: > >Garrett Wollman wrote: > >> < said: > >> > >> > I thought LIST was doubly linked, which means we should be able to have a > >> > LIST_PREV(), right? SLIST is singly linked as is STAILQ. > >> > >> There is a LIST_PREV macro, but in order to traverse the entire list > >> backwards, one must first get to the very end, which requires a loop > >> in LIST and a single dereference in TAILQ. > > > >Do you know where we can get one? For completeness we should have it and it > >is missing from our queue.h. It could probably be a simple enough variant > >of the recently added TAILQ_PREV() macro - which still gives me a headache > >trying to understand. :-) > > If you want to implement it, you have to put a second pointer in the > LIST_HEAD, and then you might as well make that pointer point to the last > element at which point a global s/LIST/TAILQ/g makes more sense. > > The TAILQ_PREV is nasty, but as far as I can tell safe. that's where I prefered CIRCLEQ but someone's removed it.... > > -- > 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. -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message