Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Jan 2001 21:29:52 -0700
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc:        John Baldwin <jhb@FreeBSD.ORG>, Jonathan Chen <jon@FreeBSD.ORG>, imp@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   Re: Cardbus woes 
Message-ID:  <200101040429.f044Tqs12960@aslan.scsiguy.com>
In-Reply-To: Your message of "Wed, 03 Jan 2001 21:13:26 MST." <200101040413.f044DQs12669@aslan.scsiguy.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>It seems to me that having a single thread per-softc gives you this
>protection without requiring any locks.  Other than having to aquire
>Giant at thread starup (as most code below us is not thread safe yet),
>I don't see any other locking requirements.

I take that back.  In pccbb_detach, you need a mechanism to ensure
that you are no-longer executing in your interrupt handler prior to
destroying the softc.  What you really want on detach (not only for
pccbb, but in general), is a way to kill your ithread via bus_teardown_intr.
Since we only provide a single ithread per shareable interrupt source,
this wouldn't quite work, but you get the general idea.  Can anyone
think of another general "synchronization method" for a case where the
second event may never happen again?  Even if you check in the detach
routine to see if an interrupt is pending in hardware for your device,
this won't tell you if your interrupt thread has already been dispatched
but the interrupt source has gone away (card was removed, so interrupt
line is dead).  Hmmm.

--
Justin



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101040429.f044Tqs12960>