Don't use magic numbers. Use defines instead (ARM_PERIIOBASE)
[AROS.git] / rom / kernel / modifyirqhandler.c
blob7515d9be1521bb943699867db5dcb99401284bfe
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_cpu.h>
14 #include <kernel_debug.h>
15 #include <kernel_interrupts.h>
16 #include <kernel_objects.h>
18 /* We use own implementation of bug(), so we don't need aros/debug.h */
19 #define D(x)
21 /*****************************************************************************
23 NAME */
24 #include <proto/kernel.h>
26 AROS_LH3(void, KrnModifyIRQHandler,
28 /* SYNOPSIS */
29 AROS_LHA(void *, handle, A0),
30 AROS_LHA(void *, handlerData, A1),
31 AROS_LHA(void *, handlerData2, A2),
33 /* LOCATION */
34 struct KernelBase *, KernelBase, 38, Kernel)
36 /* FUNCTION
37 Modify the data passed to a raw hardware IRQ handler.
39 INPUTS
40 handle - Existing handle
41 handlerData,
42 handlerData2 - User-defined data which is passed to the
43 handler.
45 RESULT
47 NOTES
49 EXAMPLE
51 BUGS
53 SEE ALSO
54 KrnAddIRQHandler(), KrnRemIRQHandler()
56 INTERNALS
58 ******************************************************************************/
60 AROS_LIBFUNC_INIT
62 struct IntrNode *intrhandle = (struct IntrNode *)handle;
64 D(bug("[KRN] KrnModifyIRQHandler(%012p, %012p, %012p):\n", handle, handlerData, handlerData2));
66 if (handle)
68 Disable();
70 intrhandle->in_HandlerData = handlerData;
71 intrhandle->in_HandlerData2 = handlerData2;
73 Enable();
76 AROS_LIBFUNC_EXIT