From owner-cvs-all Fri Jan 4 7:52:46 2002 Delivered-To: cvs-all@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 526FD37B41C; Fri, 4 Jan 2002 07:52:39 -0800 (PST) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.5/8.11.5) with ESMTP id g04FqWg89682; Fri, 4 Jan 2002 08:52:32 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200201041552.g04FqWg89682@aslan.scsiguy.com> To: Julian Elischer Cc: Poul-Henning Kamp , Stephen McKay , John Baldwin , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Julian Elischer , Greg Lehey Subject: Re: cvs commit: src/share/man/man3 queue.3 In-Reply-To: Your message of "Thu, 03 Jan 2002 11:19:28 PST." Date: Fri, 04 Jan 2002 08:52:32 -0700 From: "Justin T. Gibbs" Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > >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