Skip site navigation (1)Skip section navigation (2)
Date:      12 May 1998 11:31:57 +1000
From:      Julian Assange <proff@iq.org>
To:        Jason Thorpe <thorpej@nas.nasa.gov>
Cc:        "Justin T. Gibbs" <gibbs@plutotech.com>, gibbs@FreeBSD.ORG, hackers@FreeBSD.ORG, dyson@FreeBSD.ORG, mrg@eterna.com.au, mckusick@mckusick.com
Subject:   Re: more queue.h brokenness
Message-ID:  <wxsomgb7g2.fsf@polysynaptic.iq.org>
In-Reply-To: Jason Thorpe's message of "Mon, 11 May 1998 18:05:34 -0700"
References:  <199805120105.SAA02410@lestat.nas.nasa.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
Jason Thorpe <thorpej@nas.nasa.gov> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?wxsomgb7g2.fsf>