1 #include <proto/exec.h>
3 /* Main scheduler entry points */
4 void core_ExitInterrupt(regs_t
*regs
);
5 void core_SysCall(int sc
, regs_t
*regs
);
7 /* CPU-specific wrappers. Need to be implemented in CPU-specific parts */
8 void cpu_Switch(regs_t
*regs
);
9 void cpu_Dispatch(regs_t
*regs
);
11 /* This constant can be redefined this in arch-specific includes */
16 /* Call exec interrupt vector, if present */
17 static inline void core_Cause(unsigned char n
, unsigned int mask
)
19 struct IntVector
*iv
= &SysBase
->IntVects
[n
];
21 /* If the SoftInt vector in SysBase is set, call it. It will do the rest for us */
23 AROS_INTC3(iv
->iv_Code
, iv
->iv_Data
, mask
, _CUSTOM
);
26 /* Call exec trap handler, if possible */
27 static inline int core_Trap(ULONG code
, void *regs
)
29 /* exec.library Alert() is inoperative without KernelBase,
30 * but SysBase should not be valid if KernelBase is
35 void (*trapHandler
)(ULONG
, void *) = SysBase
->TaskTrapCode
;
36 struct Task
*t
= SysBase
->ThisTask
;
41 trapHandler
= t
->tc_TrapCode
;
46 trapHandler(code
, regs
);