From owner-freebsd-current@FreeBSD.ORG Wed Jul 20 16:23:37 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB3B116A41F for ; Wed, 20 Jul 2005 16:23:37 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29F6D43D48 for ; Wed, 20 Jul 2005 16:23:37 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j6KGNaJc035829; Wed, 20 Jul 2005 09:23:36 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j6KGNam7035828; Wed, 20 Jul 2005 09:23:36 -0700 (PDT) (envelope-from rizzo) Date: Wed, 20 Jul 2005 09:23:36 -0700 From: Luigi Rizzo To: Poul-Henning Kamp Message-ID: <20050720092336.A35394@xorpc.icir.org> References: <20050720083942.A35046@xorpc.icir.org> <7457.1121874597@phk.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <7457.1121874597@phk.freebsd.dk>; from phk@haven.freebsd.dk on Wed, Jul 20, 2005 at 05:49:57PM +0200 Cc: current@freebsd.org Subject: Re: TAILQ_* ambiguity in sys/sys/bio.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2005 16:23:37 -0000 On Wed, Jul 20, 2005 at 05:49:57PM +0200, Poul-Henning Kamp wrote: > In message <20050720083942.A35046@xorpc.icir.org>, Luigi Rizzo writes: > >forgive me if i am wrong, but there appears to be a source of > >ambiguity in the use of TAILQ* macros in sys/sys/bio.h > > Make sure to do a make universe before sending me the patch > for review. yup. Just in case someone wants to try, the field to rename is in sys/bio.h --- sys/bio.h 31 Jan 2005 23:26:55 -0000 1.139.2.4 +++ sys/bio.h 20 Jul 2005 17:42:31 -0000 @@ -103,18 +103,62 @@ struct devstat; struct bio_queue_head { - TAILQ_HEAD(bio_queue, bio) queue; + TAILQ_HEAD(_1, bio) queue; off_t last_offset; struct bio *insert_point; struct bio *switch_point; and there seems to be only one offending instance in HEAD/RELENG_6 kern/subr_disk.c:163: - bq = TAILQ_LAST(&bioq->queue, bio_queue); + bq = TAILQ_LAST(&bioq->queue, _1); and two more in RELENG_5, also in kern/subr_disk.c in bioq_remove() - head->insert_point = TAILQ_PREV(bp, bio_queue, bio_queue); + head->insert_point = TAILQ_PREV(bp, _1, bio_queue); @@ -199,7 +203,7 @@ } else { if (bioq->switch_point != NULL) be = TAILQ_PREV(bioq->switch_point, - bio_queue, bio_queue); + _1, bio_queue); /* * If we lie between last_offset and bq, * insert before bq. The offending macros are TAILQ_LAST() and TAILQ_PREV() and their users TAILQ_FOREACH_REVERSE TAILQ_FOREACH_REVERSE_SAFE cheers luigi > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence.