* tasklets and waking up sleeping process question
@ 2002-07-11 22:42 Khai Trinh
2002-07-11 23:38 ` Neil Horman
0 siblings, 1 reply; 2+ messages in thread
From: Khai Trinh @ 2002-07-11 22:42 UTC (permalink / raw)
To: linuxppc-embedded
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: tasklets and waking up sleeping process question
2002-07-11 22:42 tasklets and waking up sleeping process question Khai Trinh
@ 2002-07-11 23:38 ` Neil Horman
0 siblings, 0 replies; 2+ messages in thread
From: Neil Horman @ 2002-07-11 23:38 UTC (permalink / raw)
To: Khai Trinh; +Cc: linuxppc-embedded
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-11 23:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-11 22:42 tasklets and waking up sleeping process question Khai Trinh
2002-07-11 23:38 ` Neil Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).