Date: Mon, 11 Mar 2002 08:53:59 -0700 From: "Justin T. Gibbs" <gibbs@scsiguy.com> To: njh@tadpole.co.uk Cc: aic7xxx@FreeBSD.ORG Subject: Re: ahc_platform_abort_scbs() Message-ID: <200203111553.g2BFrxI11226@aslan.scsiguy.com> In-Reply-To: Your message of "Mon, 11 Mar 2002 14:19:42 GMT." <200203111419.g2BEJg103612@njh-1.tadpole.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
>ahc_platform_abort_scbs is looping on my Solaris 2.8 machine. > >I must be missing something, but I don't see how ahc_platform_abort_scbs() >can do anything but loop in this bit: > > busyq = &dev->busyq; > while ((acmd = TAILQ_FIRST(busyq)) != NULL) { > ,,, > TAILQ_REMOVE(busyq, acmd, > acmd_links.tqe); > ,,, > } > >since TAILQ_FIRST is defined as ((head)->tqh_first and TAILQ_REMOVE doesn't up >date tqh_first, Yes it does. Take a look at TAILQ_INSERT_HEAD(). The "previous element" of the first element in a TAILQ is the head structure itself. This is why you can remove any element of a TAILQ without knowing or caring if it is the first element in the list. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe aic7xxx" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203111553.g2BFrxI11226>