jasjit singh wrote:
Hi
I'm implementing interrupt handling routine for my driver. In
servicing the interrupt, some important work needs to be done. However
that is not more important than avoiding of interrupt disabling. So I
would prefer to do the work later(In bottom half). Presently I am
thinking of two solutions. First is tasklet based. Every time an
interrupt is there, it will schedule the tasklet that will perform the
desired work. Other is spawning a kernel thread that will sleep
indefinitely. It will be woken up whenever there is an interrupt so
that it can perform the desired operation. Both methods seem feasible.
But I am still looking for the various pros and cons of the two
solutions. Can you suggest which would be better. Or rather what
factors do I need to consider to choose between the two.
I would Workqueues. For creating a thread and making it sleep *properly*
needs a lot of work. Workqueue's infrastructure has already done it for
you. You can create your own work queue if you dont' want to use the
default provided by the kernel.
Also there is no mention of kernel threads in "LDD 3rd edition". Is it
that kernel threads are not used (or not recommended) in the drivers.
Probably because what you want to achieve in threads you can achieve by
workqueues.
--Himanshu
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ