Added a test for MUIA_Listview_SelectChange.
[AROS.git] / arch / all-mingw32 / kernel / addirqhandler.c
blob4810f4d8ac41c4174467d200a5343b12a3343340
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
7 #include <aros/kernel.h>
8 #include <aros/libcall.h>
10 #include <inttypes.h>
11 #include <stddef.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)
25 AROS_LIBFUNC_INIT
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));
33 if (handle)
35 handle->in_Handler = handler;
36 handle->in_HandlerData = handlerData;
37 handle->in_HandlerData2 = handlerData2;
38 handle->in_type = it_interrupt;
39 handle->in_nr = irq;
41 Disable();
42 ADDHEAD(KernelBase->kb_Interrupts, &handle->in_Node);
43 Enable();
45 return handle;
47 AROS_LIBFUNC_EXIT