AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
irq.h
Go to the documentation of this file.
1
#ifndef _DEV_IRQ_H
2
#define _DEV_IRQ_H
3
4
#include <
core/types.h
>
5
6
/*
7
* Devices' interrupts. A driver installs a handler for its IRQ, which is
8
* called with its `arg` when the interrupt comes. Each architecture
9
* implements this (arch/ARCH/.../irq.c).
10
*
11
* An IRQ is the number that the platform gives it: the ISA's or the I/O
12
* APIC's on the PC, the GIC's interrupt ID on the virt machine. A driver
13
* gets it from the platform (dev/platform.h), from its bus (a PCI line),
14
* or from arch_msi_alloc(); it never makes one up. An IRQ may have
15
* several handlers (a shared line): each is called, and each checks its
16
* own device. The first handler installed unmasks the IRQ, and the last
17
* one uninstalled masks it.
18
*/
19
20
/* An interrupt handler. */
21
typedef
void (*
irq_handler_t
)(
void
*arg);
22
33
int
irq_install
(
unsigned
irq,
irq_handler_t
fn,
void
*arg);
34
43
void
irq_uninstall
(
unsigned
irq,
irq_handler_t
fn,
void
*arg);
44
45
#endif
/* ! _DEV_IRQ_H */
irq_uninstall
void irq_uninstall(unsigned irq, irq_handler_t fn, void *arg)
Removes a handler that irq_install() installed.
Definition
irq.c:62
irq_install
int irq_install(unsigned irq, irq_handler_t fn, void *arg)
Installs a handler for an IRQ.
Definition
irq.c:32
irq_handler_t
void(*) irq_handler_t(void *arg)
Definition
irq.h:21
types.h
kernel
include
dev
irq.h
Generated by
1.18.0