Build fix, include deflibdefs.h during dependencies generation.
[AROS.git] / rom / exec / addintserver.c
bloba52c3e0d60297d5bf702449d6763e94bcf902a36
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Add interrupt client to chain of interrupt servers
6 Lang: english
7 */
8 #include <aros/config.h>
9 #include <exec/execbase.h>
10 #include <exec/interrupts.h>
12 #if (AROS_FLAVOUR & AROS_FLAVOUR_BINCOMPAT) && defined(mc68000)
13 #include <hardware/custom.h>
14 #include <hardware/intbits.h>
15 #endif
17 #include <proto/exec.h>
18 #include <aros/libcall.h>
20 /*****************************************************************************
22 NAME */
24 AROS_LH2(void, AddIntServer,
26 /* SYNOPSIS */
27 AROS_LHA(ULONG, intNumber, D0),
28 AROS_LHA(struct Interrupt *, interrupt, A1),
30 /* LOCATION */
31 struct ExecBase *, SysBase, 28, Exec)
33 /* FUNCTION
35 INPUTS
37 RESULT
39 NOTES
40 This function also enables the corresponding chipset interrupt if
41 run on a native Amiga.
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 ******************************************************************************/
53 AROS_LIBFUNC_INIT
54 #if (AROS_FLAVOUR & AROS_FLAVOUR_BINCOMPAT) && defined(mc68000)
55 struct Custom *custom = (struct Custom *)(void **)0xdff000;
56 #endif
58 Disable();
60 Enqueue((struct List *)SysBase->IntVects[intNumber].iv_Data, (struct Node *)interrupt);
62 #if (AROS_FLAVOUR & AROS_FLAVOUR_BINCOMPAT) && defined(mc68000)
64 Enable the chipset interrupt if run on a native Amiga.
66 custom->intena = (UWORD)(INTF_SETCLR|(1L<<intNumber));
67 #endif
69 Enable();
71 AROS_LIBFUNC_EXIT
72 } /* AddIntServer */