最終更新:2014-06-05 (木) 21:11:31 (3603d)  

request_threaded_irq
Top / request_threaded_irq

allocate an interrupt line

https://www.kernel.org/doc/htmldocs/kernel-api/API-request-threaded-irq.html

request_threaded_irq(unsigned int irq, irq_handler_t handler, irq_handler_t thread_fn, unsigned long flags, const char *name, void *dev);

引数

  • irq - Interrupt line to allocate
  • handler - Function to be called when the IRQ occurs. (request_irq)
    • Primary handler for threaded interrupts
    • If NULL and thread_fn != NULL the default primary handler is installed
  • thread_fn - Function called from the irq handler thread If NULL, no irq thread is created
  • irqflags - Interrupt type flags
  • devname - An ascii name for the claiming device
  • dev_id - A cookie passed back to the handler function

実装

  • kernel/irq/manage.c?

呼び出し

  • irq_to_desc?
  • irq_settings_can_request?
  • irq_default_primary_handler?
  • __setup_irq?

request_irqとの違い

request_irqrequest_threaded_irqのラッパー

  • 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);
    }