From owner-freebsd-hackers@FreeBSD.ORG Wed May 1 07:41:54 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AE819F17 for ; Wed, 1 May 2013 07:41:54 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 76103102E for ; Wed, 1 May 2013 07:41:54 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 7816E7E820 for ; Wed, 1 May 2013 17:41:52 +1000 (EST) Message-ID: <5180C740.1060104@freebsd.org> Date: Wed, 01 May 2013 17:41:52 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130314 Thunderbird/17.0.4 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: Adding a FOREACH_CONTINUE() variant to queue(3) References: <518092BF.9070105@freebsd.org> <74840.1367386143@critter.freebsd.dk> <5180AF55.5070000@freebsd.org> In-Reply-To: <5180AF55.5070000@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 May 2013 07:41:54 -0000 On 05/01/13 15:59, Lawrence Stewart wrote: > On 05/01/13 15:29, Poul-Henning Kamp wrote: >> In message <518092BF.9070105@freebsd.org>, Lawrence Stewart writes: >>> [reposting from freebsd-arch@ - was probably the wrong list] >> >>> #define TAILQ_FOREACH_CONTINUE(var, head, field) \ >> >> Obligatory bikeshedding: >> >> I find the suffix "_CONTINUE" non-obvious, as there may not have >> been any previos FOREACH involved. >> >> TAILQ_FOREACH_FROM(...) ? > > Agreed. Thanks for the input. Here's an untested patch for consideration: http://people.freebsd.org/~lstewart/patches/misc/queue_foreach_from_10.x.r250136.patch I didn't do _SAFE variants as I don't have an immediate use for them. Cheers, Lawrence