Reformatting and detab
[AROS.git] / rom / kernel / remirqhandler.c
blob1c07819a6e2893834849ca719cbea836cc11c872
1 #include <aros/kernel.h>
2 #include <aros/libcall.h>
3 #include <proto/exec.h>
5 #include <kernel_base.h>
6 #include <kernel_interrupts.h>
7 #include <kernel_objects.h>
9 /*****************************************************************************
11 NAME */
12 #include <proto/kernel.h>
14 AROS_LH1(void, KrnRemIRQHandler,
16 /* SYNOPSIS */
17 AROS_LHA(void *, handle, A0),
19 /* LOCATION */
20 struct KernelBase *, KernelBase, 8, Kernel)
22 /* FUNCTION
23 Remove previously installed hardware IRQ handler
25 INPUTS
26 handle - an opaque handler returned by KrnAddIRQHandler()
27 function
29 RESULT
30 None
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
40 INTERNALS
42 ******************************************************************************/
44 AROS_LIBFUNC_INIT
46 struct IntrNode *h = handle;
47 uint8_t irq = h->in_nr;
49 if (h && (h->in_type == it_interrupt))
51 (void)goSuper();
53 Disable();
54 REMOVE(h);
55 if (IsListEmpty(&KernelBase->kb_Interrupts[irq]))
57 ictl_disable_irq(irq, KernelBase);
59 Enable();
61 krnFreeIntrNode(h);
63 goUser();
66 AROS_LIBFUNC_EXIT