Date: Thu, 4 Jan 2001 15:44:04 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: Tony Finch <dot@dotat.at> Cc: arch@FreeBSD.ORG Subject: Re: Reinstatement of CIRCLEQ Message-ID: <20010104154404.F292@fw.wintelcom.net> In-Reply-To: <20010104222519.Y2140@hand.dotat.at>; from dot@dotat.at on Thu, Jan 04, 2001 at 10:25:19PM %2B0000 References: <20010104001943.T292@fw.wintelcom.net> <200101041708.JAA05731@beastie.mckusick.com> <20010104222519.Y2140@hand.dotat.at>
next in thread | previous in thread | raw e-mail | index | archive | help
* Tony Finch <dot@dotat.at> [010104 14:25] wrote: > Kirk McKusick <mckusick@mckusick.com> wrote: > > From: Alfred Perlstein <bright@wintelcom.net> > > > > You're right, I'm wondering though, would it be possible > > to change TAILQ_PREV(elm, headname, field) to TAILQ_PREV(elm, > > field) by using the offset of 'field' into the struct? > > You could subtract the offset of 'field' from the tqe_prev > > of the next struct right? > > > >You are correct that your suggested change is exactly the > >unportability/headache that I am trying to avoid. > > The Apache Group needed a linked list structure that would allow > insertions before and after a given element without knowing the > address of the list header. Although I wanted to use sys/queue.h it > didn't quite have that functionality so I wrote some "ring" macros > based on code by Dean Gaudet. Why not just use "LIST" then? -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010104154404.F292>