Urgent interrupt thread
John Baldwin
jhb at freebsd.org
Mon Aug 15 17:30:14 UTC 2011
On Friday, August 12, 2011 4:59:18 am Ninad Adi wrote:
> Thanks for your prompt replies sir,
> just one more clarification
>
> the routine bus_setup_intr has 5th arg of
> type driver_intr_t ithread then if I am not
> wrong my isr is running as a thread, probably
> thats the reason why latest drivers dont use
> Deferring mechanism like iwi, iwn, ral. However
> Atheros is still using taskqueues which is considerably old I suppose.
> So using filter+ithread model without deferring
> Should be fine.
> Plz let me know your opinions on the same,
> It would help me understand freebsd better.
> Will not disturb you more.
> Awaiting,reply
You should just use the 'driver_intr_t' method which will be a function that
runs in an ithread. It cannot sleep in that it cannot call functions like
tsleep() or cv_wait() or use "sleepable" locks like sx(9) locks. It can,
however, use other locks such as mutexes and rwlocks. It can also wakeup
other sleeping threads using cv_signal/broadcast, wakeup(), etc. In general
you probably don't need to use a filter routine.
--
John Baldwin
More information about the freebsd-threads
mailing list