Re request_threaded_irq

Javier Martinez Canillas martinez.javier at gmail.com
Thu Jan 26 03:48:48 EST 2012


On Wed, Jan 25, 2012 at 5:45 AM, Asutosh Das <das.asutosh at gmail.com> wrote:
> Hi
> I have a query regarding the difference between request_irq and
> request_threaded_irq.
> I am aware that the thread_fn_handler may sleep, allocate memory,
> acquire locks etc.
>
> What context does the thread fn passed to the request_threaded_irq run in ?
>
> TIA
>
> --
> ~/asd

It runs in process context not in interrupt context. It is a normal
kernel thread. That is why as you said it can sleep (since it can be
schedule again), can allocate any time of memory (even if this
operations leads to a sleep) and acquire locks (which also makes the
process sleep if it fails to do it).

Best regards,

-- 
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain



More information about the Kernelnewbies mailing list