参照元†
- CONFIG_GENERIC_HARDIRQS の有効、無効によって、処理の本体が異なる。
- FIXME: なぜ???
- CONFIG_GENERIC_HARDIRQS 有効: request_threaded_irq()
- CONFIG_GENERIC_HARDIRQS 無効: request_irq()
- unsigned int irq
- irq_handler_t handler
- unsigned long flags
- const char *name
- void *dev
返り値†
#ifdef CONFIG_GENERIC_HARDIRQS
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);
static inline int __must_check
request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
const char *name, void *dev)
{
return request_threaded_irq(irq, handler, NULL, flags, name, dev);
}
- CONFIG_GENERIC_HARDIRQS が有効なアーキテクチャでは、
request_irq() は request_threaded_irq() の別名である。
extern void exit_irq_thread(void);
#else
extern int __must_check
request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
const char *name, void *dev);
/*
* Special function to avoid ifdeffery in kernel/irq/devres.c which
* gets magically built by GENERIC_HARDIRQS=n architectures (sparc,
* m68k). I really love these $@%#!* obvious Makefile references:
* ../../../kernel/irq/devres.o
*/
static inline 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)
{
return request_irq(irq, handler, flags, name, dev);
}
- CONFIG_GENERIC_HARDIRQS が無効なアーキテクチャでは、
request_threaded_irq() は request_irq() の別名である。
static inline void exit_irq_thread(void) { }
#endif
コメント†