Date: Mon, 15 Aug 2011 13:10:49 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-threads@freebsd.org Subject: Re: Urgent interrupt thread Message-ID: <201108151310.49272.jhb@freebsd.org> In-Reply-To: <CAEOZPkYHZ2J12OpY-hz6yMH0V%2B2B7EN3ws5Z9kVizYpNtvo5nA@mail.gmail.com> References: <CAEOZPkYPQeBv7t0vUDN%2BY6jXUQ6HdK7eJb05gfXNUwb49Wphag@mail.gmail.com> <4E44E326.9070405@freebsd.org> <CAEOZPkYHZ2J12OpY-hz6yMH0V%2B2B7EN3ws5Z9kVizYpNtvo5nA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108151310.49272.jhb>