5 Copyright © 1995-2018, The AROS Development Team. All rights reserved.
11 #include <proto/exec.h>
13 #include "exec_platform.h"
15 /* Main scheduler entry points */
16 void core_ExitInterrupt(regs_t
*regs
);
17 void core_SysCall(int sc
, regs_t
*regs
);
19 /* CPU-specific wrappers. Need to be implemented in CPU-specific parts */
20 void cpu_Switch(regs_t
*regs
);
21 void cpu_Dispatch(regs_t
*regs
);
23 /* This constant can be redefined in arch-specific includes */
28 /* Call exec interrupt vector, if present */
29 static inline void core_Cause(unsigned char n
, unsigned int mask
)
31 struct IntVector
*iv
= &SysBase
->IntVects
[n
];
33 /* If the SoftInt vector in SysBase is set, call it. It will do the rest for us */
35 AROS_INTC3(iv
->iv_Code
, iv
->iv_Data
, mask
, _CUSTOM
);
38 /* Call exec trap handler, if possible */
39 static inline int core_Trap(ULONG code
, void *regs
)
41 /* exec.library Alert() is inoperative without KernelBase,
42 * but SysBase should not be valid if KernelBase is
47 void (*trapHandler
)(ULONG
, void *) = SysBase
->TaskTrapCode
;
48 struct Task
*t
= GET_THIS_TASK
;
53 trapHandler
= t
->tc_TrapCode
;
58 trapHandler(code
, regs
);
64 #endif /* !KERNEL_INTR_H */