>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.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message