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_UFC5(void, iv
->iv_Code
,
24 AROS_UFCA(ULONG
, mask
, D1
),
25 AROS_UFCA(APTR
, _CUSTOM
, A0
),
26 AROS_UFCA(APTR
, iv
->iv_Data
, A1
),
27 AROS_UFCA(APTR
, iv
->iv_Code
, A5
),
28 AROS_UFCA(struct ExecBase
*, SysBase
, A6
));
31 /* Call exec trap handler, if possible */
32 static inline int core_Trap(ULONG code
, void *regs
)
34 /* exec.library Alert() is inoperative without KernelBase */
35 if (SysBase
&& KernelBase
)
37 void (*trapHandler
)(ULONG
, void *) = SysBase
->TaskTrapCode
;
38 struct Task
*t
= SysBase
->ThisTask
;
43 trapHandler
= t
->tc_TrapCode
;
48 trapHandler(code
, regs
);