Fix IO memory access .. SB128 driver makes noises in VMWare - CMI is untested (Curren...
[AROS.git] / rom / exec / remintserver.c
blob4ef1346d74e3b08e9e942276f20a79b129c2cb25
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Remove an interrupt handler.
6 Lang:
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, RemIntServer,
26 /* SYNOPSIS */
27 AROS_LHA(ULONG, intNumber, D0),
28 AROS_LHA(struct Interrupt *, interrupt, A1),
30 /* LOCATION */
31 struct ExecBase *, SysBase, 29, Exec)
33 /* FUNCTION
35 INPUTS
37 RESULT
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 ******************************************************************************/
51 AROS_LIBFUNC_INIT
52 #if (AROS_FLAVOUR & AROS_FLAVOUR_BINCOMPAT) && defined(mc68000)
53 struct List *list;
54 volatile struct Custom *custom = (struct Custom *)(void **)0xdff000;
56 list = (struct List *)SysBase->IntVects[intNumber].iv_Data;
57 #endif
59 Disable();
61 Remove((struct Node *)interrupt);
63 #if (AROS_FLAVOUR & AROS_FLAVOUR_BINCOMPAT) && defined(mc68000)
64 if(list->lh_TailPred == (struct Node *)list)
66 /* disable interrupts if there are no more nodes on the list */
67 if (intNumber < INTB_INTEN)
68 custom->intena = (UWORD)((1<<intNumber));
70 #endif
72 Enable();
74 AROS_LIBFUNC_EXIT
75 } /* RemIntServer */