Add a wishful comment
[AROS.git] / rom / kernel / remirqhandler.c
blob9a8191f5d448be513443babdc53074473847d4f9
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 */
8 #include <aros/kernel.h>
9 #include <aros/libcall.h>
10 #include <proto/exec.h>
12 #include <kernel_base.h>
13 #include <kernel_interrupts.h>
14 #include <kernel_objects.h>
16 /*****************************************************************************
18 NAME */
19 #include <proto/kernel.h>
21 AROS_LH1(void, KrnRemIRQHandler,
23 /* SYNOPSIS */
24 AROS_LHA(void *, handle, A0),
26 /* LOCATION */
27 struct KernelBase *, KernelBase, 8, Kernel)
29 /* FUNCTION
30 Remove previously installed hardware IRQ handler
32 INPUTS
33 handle - an opaque handler returned by KrnAddIRQHandler()
34 function
36 RESULT
37 None
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 ******************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct IntrNode *h = handle;
54 uint8_t irq = h->in_nr;
56 if (h && (h->in_type == it_interrupt))
58 (void)goSuper();
60 Disable();
61 REMOVE(h);
62 if (IsListEmpty(&KernelBase->kb_Interrupts[irq]))
64 ictl_disable_irq(irq, KernelBase);
66 Enable();
68 krnFreeIntrNode(h);
70 goUser();
73 AROS_LIBFUNC_EXIT