2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
10 /* Main scheduler entry points */
11 void core_ExitInterrupt(regs_t
*regs
);
12 void core_SysCall(int sc
, regs_t
*regs
);
14 /* CPU-specific wrappers. Need to be implemented in CPU-specific parts */
15 void cpu_Switch(regs_t
*regs
);
16 void cpu_Dispatch(regs_t
*regs
);
18 /* This constant can be redefined this in arch-specific includes */
23 /* Call exec interrupt vector, if present */
24 static inline void core_Cause(unsigned char n
, unsigned int mask
)
26 struct IntVector
*iv
= &SysBase
->IntVects
[n
];
28 /* If the SoftInt vector in SysBase is set, call it. It will do the rest for us */
30 AROS_INTC3(iv
->iv_Code
, iv
->iv_Data
, mask
, _CUSTOM
);
33 /* Call exec trap handler, if possible */
34 static inline int core_Trap(ULONG code
, void *regs
)
36 /* exec.library Alert() is inoperative without KernelBase,
37 * but SysBase should not be valid if KernelBase is
42 void (*trapHandler
)(ULONG
, void *) = SysBase
->TaskTrapCode
;
43 struct Task
*t
= SysBase
->ThisTask
;
48 trapHandler
= t
->tc_TrapCode
;
53 trapHandler(code
, regs
);