Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Jan 2002 08:52:32 -0700
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, Stephen McKay <mckay@thehub.com.au>, John Baldwin <jhb@FreeBSD.org>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Julian Elischer <julian@FreeBSD.org>, Greg Lehey <grog@FreeBSD.org>
Subject:   Re: cvs commit: src/share/man/man3 queue.3 
Message-ID:  <200201041552.g04FqWg89682@aslan.scsiguy.com>
In-Reply-To: Your message of "Thu, 03 Jan 2002 11:19:28 PST." <Pine.BSF.4.21.0201031117020.24204-100000@InterJet.elischer.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
>
>
>On Thu, 3 Jan 2002, Poul-Henning Kamp wrote:
>
>> 
>> If for instance we (re)introduce CIRCLEQ or certain other queue
>> types, it is by no means obvious that the continuation clause
>> of the FOREACH() will be "!= NULL".
>
>But that would not be TAILQ_FOREACH, which is the only one I'm talking
>about.
>So it's irrelevant, and WHY it's behaviour should be documented.
>so that you can tell the difference between the behaviour of a
>TAILQ_FOREACH and 
>CIRCLEQ_FOREACH.

Any foreach macro must test the termination condition.  If we decided
to define that the element pointer == NULL for a complete traversal, this
would be at most a single assignment within the the termination
conditional.  I don't believe that this cost is excessive in order to have
simple and easy to understand semantics that mirror the comon C constructs
these macros are meant to replace.

--
Justin

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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