Actions
Feature #3318
openSupport threaded irq handlers in envgen
Start date:
08/02/2012
Due date:
% Done:
0%
Estimated time:
Published in build:
Description
The function request_threaded_irq accepts two interrupt handlers
- @handler (second parameter) - Regular interrupt handler
- @thread_fn (third parameter) - Function called from the irq handler thread (has thread context, hence for example may use might_sleep functions)
From comments:
If you want to set up a threaded irq handler for your device
then you need to supply @handler and @thread_fn. @handler is
still called in hard interrupt context and has to check
whether the interrupt originates from the device. If yes it
needs to disable the interrupt on the device and return
IRQ_WAKE_THREAD which will wake up the handler thread and run
@thread_fn. This split handler design is necessary to support
shared interrupts.
extern int __must_check request_threaded_irq(unsigned int irq, irq_handler_t handler, irq_handler_t thread_fn, unsigned long flags, const char *name, void *dev);Driver environment generator should call
- @handler with LDV_IN_INTERRUPT set (as usual)
- @thread_fn without LDV_IN_INTERRUPT set
now it calls both with LDV_IN_INTERRUPT set
Actions