From owner-freebsd-hackers@FreeBSD.ORG Mon May 20 20:42:21 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 EF9F52F0; Mon, 20 May 2013 20:42:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id C2DC41889; Mon, 20 May 2013 20:42:21 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EC593B9A6; Mon, 20 May 2013 16:42:20 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Subject: Re: Adding a FOREACH_CONTINUE() variant to queue(3) Date: Mon, 20 May 2013 15:39:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <518092BF.9070105@freebsd.org> <5180AF55.5070000@freebsd.org> <5180C740.1060104@freebsd.org> In-Reply-To: <5180C740.1060104@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201305201539.57848.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 20 May 2013 16:42:21 -0400 (EDT) Cc: Lawrence Stewart 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: Mon, 20 May 2013 20:42:22 -0000 On Wednesday, May 01, 2013 3:41:52 am Lawrence Stewart wrote: > 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. Looks ok to me. I agree with phk@ and prefer the _FROM name. -- John Baldwin