3 intrenable, intrdisable \- enable (disable) an interrupt handler
7 void intrenable(int v, void (*f)(Ureg*, void*), void* a, int tbdf, char *name)
10 void intrdisable(int v, void (*f)(Ureg*, void*), void* a, int tbdf, char *name)
15 to be called by the kernel's interrupt controller driver each time
16 an interrupt denoted by
18 occurs, and unmasks the corresponding interrupt in the interrupt controller.
21 is platform-dependent; it is often an interrupt vector number, but
24 is a platform-dependent value that might further qualify
27 denote the type of bus, bus instance, device number and function
28 (following the PCI device indexing scheme), hence its name,
29 but can have platform-dependent meaning.
31 is a string that should uniquely identify the corresponding device (eg, \f5"uart0"\fP);
32 again it is usually platform-dependent.
34 supports sharing of interrupt levels when the hardware does.
38 is a function defined in a device driver to carry out the device-specific work associated with a given interrupt.
43 typically it points to the driver's data for a given device or controller.
49 contains the registers saved by the interrupt handler (the
50 contents are platform specific;
51 see the platform's include file
55 is invoked by underlying code in the kernel that is invoked directly from the hardware vectors.
56 It is therefore not running in any process (see
58 indeed, on many platforms
59 the current process pointer
62 There are many restrictions on kernel functions running outside a process, but a fundamental one is that
65 although they often call
67 to signal the occurrence of an event associated with the interrupt.
69 and other manual pages note which functions are safe for
73 The interrupt controller driver does whatever is
74 required to acknowledge or dismiss the interrupt signal in the interrupt controller,
77 for edge-triggered interrupts,
80 for level-triggered ones.
82 is responsible for dealing with the cause of the interrupt in the device, including any
83 acknowledgement required in the device, before it returns.
86 removes any registration previously made by
88 with matching parameters, and if no other
89 interrupt is active on
91 it masks the interrupt in the controller.
92 Device drivers that are not dynamically configured tend to call
94 during reset or initialisation (see
96 but can call it at any appropriate time, and
99 they can simply enable or disable interrupts in the device as required.
101 .B /sys/src/9/*/trap.c