1 #include <aros/asmcall.h>
2 #include <exec/execbase.h>
3 #include <exec/lists.h>
5 #include "intservers.h"
8 * Our default IntVectors.
9 * This interrupt handler will send an interrupt to a series of queued
10 * interrupt servers. Servers should return D0 != 0 (Z clear) if they
11 * believe the interrupt was for them, and no further interrupts will
12 * be called. This will only check the value in D0 for non-m68k systems,
13 * however it SHOULD check the Z-flag on 68k systems.
15 * Hmm, in that case I would have to separate it from this file in order
16 * to replace it... TODO: this can be done after merging exec_init.c from
17 * i386 and PPC native.
19 AROS_UFH5(void, IntServer
,
20 AROS_UFHA(ULONG
, intMask
, D0
),
21 AROS_UFHA(struct Custom
*, custom
, A0
),
22 AROS_UFHA(struct List
*, intList
, A1
),
23 AROS_UFHA(APTR
, intCode
, A5
),
24 AROS_UFHA(struct ExecBase
*, SysBase
, A6
))
28 struct Interrupt
* irq
;
30 ForeachNode(intList
, irq
)
32 if( AROS_UFC4(int, irq
->is_Code
,
33 AROS_UFCA(struct Custom
*, custom
, A0
),
34 AROS_UFCA(APTR
, irq
->is_Data
, A1
),
35 AROS_UFCA(APTR
, irq
->is_Code
, A5
),
36 AROS_UFCA(struct ExecBase
*, SysBase
, A6
)
48 /* VBlankServer. The same as general purpose IntServer but also counts task's quantum */
49 AROS_UFH5(void, VBlankServer
,
50 AROS_UFHA(ULONG
, intMask
, D1
),
51 AROS_UFHA(struct Custom
*, custom
, A0
),
52 AROS_UFHA(struct List
*, intList
, A1
),
53 AROS_UFHA(APTR
, intCode
, A5
),
54 AROS_UFHA(struct ExecBase
*, SysBase
, A6
))
58 /* First decrease Elapsed time for current task */
59 if (SysBase
->Elapsed
&& (--SysBase
->Elapsed
== 0))
61 SysBase
->SysFlags
|= SFF_QuantumOver
;
62 SysBase
->AttnResched
|= ARF_AttnSwitch
;
65 /* Chain to the generic routine */
66 AROS_UFC5(void, IntServer
,
67 AROS_UFCA(ULONG
, intMask
, D1
),
68 AROS_UFCA(struct Custom
*, custom
, A0
),
69 AROS_UFCA(struct List
*, intList
, A1
),
70 AROS_UFCA(APTR
, intCode
, A5
),
71 AROS_UFCA(struct ExecBase
*, SysBase
, A6
));