tasklets and waking up sleeping process question

2 messages, 2 authors, 2002-07-11 · open the first message on its own page

tasklets and waking up sleeping process question

From: Khai Trinh <hidden>
Date: 2002-07-11 22:42:10

I have new to Linux. I am reading the Linux device
driver book second eddition and am trying to make some
sense out of it.

I am trying to implement an interrupt handler. From
the description in the book, it seems that one can go
about implementing the bottom half either using the
tasklets method or by waking up a sleeping process in
the top half interrupt handler.

Is what I understood correct or I am totally of the
topics?

When do you determine which method to implement for an
interrupt handler?

Regards,
--Khai


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: tasklets and waking up sleeping process question

From: Neil Horman <hidden>
Date: 2002-07-11 23:38:09

You _can_ do either.  Doing the later however, is more or less re-inventing the
wheel, as the tasklet mechanism is designed specifically so that you can do non
time-sensitive interrupt work (the tasklet runs in interrupt context, but with
interrupts still enabled).  So going to the trouble to create a kernel thread to
  pend on a semaphore to be unlocked by an interrupt handler top-half really
never makes sense, unless you need to be able to move your driver code between a
linux environment and a non-linux environment which doesn't have the concept of
tasklets.  Even then, I'd still suggest that you put your code together in such
a way that when building for linux you use tasklets rather than a whole new
kernel thread.
Hope that helps!
Neil

Khai Trinh wrote:
I have new to Linux. I am reading the Linux device
driver book second eddition and am trying to make some
sense out of it.

I am trying to implement an interrupt handler. From
the description in the book, it seems that one can go
about implementing the bottom half either using the
tasklets method or by waking up a sleeping process in
the top half interrupt handler.

Is what I understood correct or I am totally of the
topics?

When do you determine which method to implement for an
interrupt handler?

Regards,
--Khai


--
/******************************************************************
*Neil Horman
*Software Engineer
*LVL7 Systems
*13000 Weston Pkwy.
*Cary, NC 27513
*(919)-865-2915
*nhorman@lvl7.com
*PGP keyID 0xB5E1020A
*http://www.keyserver.net/en
*******************************************************************/


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help