|
AquilaOS documentation
How it works, and its code
|
#include <core/types.h>Go to the source code of this file.
Typedefs | |
| typedef void(*) | irq_handler_t(void *arg) |
Functions | |
| int | irq_install (unsigned irq, irq_handler_t fn, void *arg) |
| Installs a handler for an IRQ. | |
| void | irq_uninstall (unsigned irq, irq_handler_t fn, void *arg) |
| Removes a handler that irq_install() installed. | |
| int irq_install | ( | unsigned | irq, |
| irq_handler_t | fn, | ||
| void * | arg ) |
Installs a handler for an IRQ.
The first handler installed unmasks the IRQ at its interrupt controller.
| irq | the IRQ, the platform's number for it |
| fn | the handler |
| arg | the argument the handler is called with |
Definition at line 32 of file irq.c.
References handler::arg, chip_of(), handler::fn, gic_enable(), handlers, irq_install(), IRQ_NR, irqs, kmalloc(), M_ZERO, handler::next, x86_irq_chip::unmask, X86_IRQ_NR, and X86_IRQ_TIMER.
Referenced by arch_msi_alloc(), ata_probe(), e1000_probe(), i8042_init(), irq_install(), pl011_init(), platform_timer_setup(), timer_setup(), uart_8250_attach(), and x86_lapic_timer_setup().
| void irq_uninstall | ( | unsigned | irq, |
| irq_handler_t | fn, | ||
| void * | arg ) |
Removes a handler that irq_install() installed.
The last handler removed masks the IRQ at its interrupt controller.
| irq | the IRQ |
| fn | the handler, as it was installed |
| arg | its argument, as it was installed |
Definition at line 62 of file irq.c.
References handler::arg, chip_of(), handler::fn, gic_disable(), handlers, IRQ_NR, irq_uninstall(), irqs, kfree(), x86_irq_chip::mask, handler::next, X86_IRQ_NR, and X86_IRQ_TIMER.
Referenced by irq_uninstall().