4 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
10 #include <proto/exec.h>
12 #include "exec_platform.h"
14 /* Main scheduler entry points */
15 void core_ExitInterrupt(regs_t
*regs
);
16 void core_SysCall(int sc
, regs_t
*regs
);
18 /* CPU-specific wrappers. Need to be implemented in CPU-specific parts */
19 void cpu_Switch(regs_t
*regs
);
20 void cpu_Dispatch(regs_t
*regs
);
22 /* This constant can be redefined this in arch-specific includes */
27 /* Call exec interrupt vector, if present */
28 static inline void core_Cause(unsigned char n
, unsigned int mask
)
30 struct IntVector
*iv
= &SysBase
->IntVects
[n
];
32 /* If the SoftInt vector in SysBase is set, call it. It will do the rest for us */
34 AROS_INTC3(iv
->iv_Code
, iv
->iv_Data
, mask
, _CUSTOM
);
37 /* Call exec trap handler, if possible */
38 static inline int core_Trap(ULONG code
, void *regs
)
40 /* exec.library Alert() is inoperative without KernelBase,
41 * but SysBase should not be valid if KernelBase is
46 void (*trapHandler
)(ULONG
, void *) = SysBase
->TaskTrapCode
;
47 struct Task
*t
= GET_THIS_TASK
;
52 trapHandler
= t
->tc_TrapCode
;
57 trapHandler(code
, regs
);
63 #endif /* !KERNEL_INTR_H */