revert between 56095 -> 55830 in arch
[AROS.git] / arch / m68k-amiga / cia / cia_interrupt.c
blob44a4fd05673ed4adbd859248e584405c82eb5324
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/libraries.h>
7 #include <aros/asmcall.h>
8 #include <proto/cia.h>
9 #include <hardware/cia.h>
11 #include "cia_intern.h"
13 AROS_INTH1(Cia_Handler, struct CIABase *, CiaBase)
15 AROS_INTFUNC_INIT
17 UBYTE mask;
19 CiaBase->active_mask |= CiaBase->hw->ciaicr & 0x1f;
20 mask = CiaBase->enable_mask & CiaBase->active_mask;
22 if (mask) {
23 int i;
24 CiaBase->executing_mask = mask;
25 CiaBase->active_mask &= ~mask;
26 for (i = 0; i < VECTORS_NUM; i++) {
27 if (mask & (1 << i)) {
28 struct Interrupt *ciaint = CiaBase->Vectors[i];
29 if (ciaint) {
30 AROS_INTC1(ciaint->is_Code, ciaint->is_Data);
34 CiaBase->executing_mask = 0;
37 return FALSE;
39 AROS_INTFUNC_EXIT