Minor fixes to comments.
[AROS.git] / rom / exec / intservers.c
blob5334b793cd89410a56f9779999cd4a81924ff015
1 #include <aros/asmcall.h>
2 #include <exec/execbase.h>
3 #include <exec/lists.h>
5 #include "intservers.h"
7 /*
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_INTH3(IntServer, struct List *, intList, intMask, custom)
21 AROS_INTFUNC_INIT
23 struct Interrupt * irq;
24 BOOL ret = FALSE;
26 ForeachNode(intList, irq) {
27 if (AROS_INTC3(irq->is_Code, irq->is_Data, intMask, custom)) {
28 #ifndef __mc68000
29 ret = TRUE;
30 break;
31 #endif
35 return ret;
37 AROS_INTFUNC_EXIT
40 /* VBlankServer. The same as general purpose IntServer but also counts task's quantum */
41 AROS_INTH3(VBlankServer, struct List *, intList, intMask, custom)
43 AROS_INTFUNC_INIT
45 /* First decrease Elapsed time for current task */
46 if (SysBase->Elapsed && (--SysBase->Elapsed == 0))
48 SysBase->SysFlags |= SFF_QuantumOver;
49 SysBase->AttnResched |= ARF_AttnSwitch;
52 /* Chain to the generic routine */
53 return AROS_INTC3(IntServer, intList, intMask, custom);
55 AROS_INTFUNC_EXIT