fix comment
[AROS.git] / rom / exec / intservers.c
blob953ae7e6d92e4308e3840767e0b292b2f2960349
1 /*
2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/asmcall.h>
7 #include <exec/execbase.h>
8 #include <exec/lists.h>
10 #define AROS_NO_ATOMIC_OPERATIONS
11 #include <exec_platform.h>
13 #include "intservers.h"
16 * Our default IntVectors.
17 * This interrupt handler will send an interrupt to a series of queued
18 * interrupt servers. Servers should return D0 != 0 (Z clear) if they
19 * believe the interrupt was for them, and no further interrupts will
20 * be called. This will only check the value in D0 for non-m68k systems,
21 * however it SHOULD check the Z-flag on 68k systems.
23 * Hmm, in that case I would have to separate it from this file in order
24 * to replace it... TODO: this can be done after merging exec_init.c from
25 * i386 and PPC native.
27 AROS_INTH3(IntServer, struct List *, intList, intMask, custom)
29 AROS_INTFUNC_INIT
31 struct Interrupt * irq;
32 BOOL ret = FALSE;
34 ForeachNode(intList, irq) {
35 if (AROS_INTC3(irq->is_Code, irq->is_Data, intMask, custom)) {
36 #ifndef __mc68000
37 ret = TRUE;
38 break;
39 #endif
43 return ret;
45 AROS_INTFUNC_EXIT
48 /* VBlankServer. The same as general purpose IntServer but also counts task's quantum */
49 AROS_INTH3(VBlankServer, struct List *, intList, intMask, custom)
51 AROS_INTFUNC_INIT
53 /* First decrease Elapsed time for current task */
54 if (SysBase->Elapsed && (--SysBase->Elapsed == 0))
56 FLAG_SCHEDQUANTUM_SET;
57 FLAG_SCHEDSWITCH_SET;
60 /* Chain to the generic routine */
61 return AROS_INTC3(IntServer, intList, intMask, custom);
63 AROS_INTFUNC_EXIT