2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
7 #include <aros/kernel.h>
8 #include <aros/libcall.h>
13 #include <proto/exec.h>
15 #include "kernel_base.h"
16 #include "kernel_interrupts.h"
18 AROS_LH4(void *, KrnAddIRQHandler
,
19 AROS_LHA(uint8_t, irq
, D0
),
20 AROS_LHA(void *, handler
, A0
),
21 AROS_LHA(void *, handlerData
, A1
),
22 AROS_LHA(void *, handlerData2
, A2
),
23 struct KernelBase
*, KernelBase
, 7, Kernel
)
27 struct IntrNode
*handle
;
29 D(bug("[KRN] KrnAddIRQHandler(%02x, %012p, %012p, %012p):\n", irq
, handler
, handlerData
, handlerData2
));
30 handle
= AllocMem(sizeof(struct IntrNode
), MEMF_PUBLIC
);
31 D(bug("[KRN] handle=%012p\n", handle
));
35 handle
->in_Handler
= handler
;
36 handle
->in_HandlerData
= handlerData
;
37 handle
->in_HandlerData2
= handlerData2
;
38 handle
->in_type
= it_interrupt
;
42 ADDHEAD(KernelBase
->kb_Interrupts
, &handle
->in_Node
);