From owner-freebsd-hackers Mon May 11 18:32:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA04343 for freebsd-hackers-outgoing; Mon, 11 May 1998 18:32:10 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from iq.org (proff@polysynaptic.iq.org [203.4.184.222]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id SAA04182 for ; Mon, 11 May 1998 18:31:57 -0700 (PDT) (envelope-from proff@iq.org) Received: (qmail 3095 invoked by uid 110); 12 May 1998 01:31:57 -0000 To: Jason Thorpe Cc: "Justin T. Gibbs" , gibbs@FreeBSD.ORG, hackers@FreeBSD.ORG, dyson@FreeBSD.ORG, mrg@eterna.com.au, mckusick@mckusick.com Subject: Re: more queue.h brokenness References: <199805120105.SAA02410@lestat.nas.nasa.gov> From: Julian Assange Date: 12 May 1998 11:31:57 +1000 In-Reply-To: Jason Thorpe's message of "Mon, 11 May 1998 18:05:34 -0700" Message-ID: Lines: 21 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jason Thorpe writes: > Given how the TAILQ_PREV() and TAILQ_LAST() macros work (when I realized > how they work, I had to stop, get up, and go get another cup of coffee > to calm my nerves), I just have to ask: > > "Why no just use CIRCLEQ?" > > I mean, that's what they're for, and they're not really that much more > expensive (only on insertion; an extra pointer indirection, and modify > two elements rather than one). End of list detection is also more complex. Speaking of circle queues, isn't this is an infinite loop? #define CIRCLEQ_FOREACH(var, head, field) \ for((var) = (head)->cqh_first; (var); (var) = (var)->field.cqe_next) Cheers, Julian. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message