Date: Wed, 20 Jul 2005 09:23:36 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Poul-Henning Kamp <phk@haven.freebsd.dk> Cc: current@freebsd.org Subject: Re: TAILQ_* ambiguity in sys/sys/bio.h Message-ID: <20050720092336.A35394@xorpc.icir.org> In-Reply-To: <7457.1121874597@phk.freebsd.dk>; from phk@haven.freebsd.dk on Wed, Jul 20, 2005 at 05:49:57PM %2B0200 References: <20050720083942.A35046@xorpc.icir.org> <7457.1121874597@phk.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050720092336.A35394>