Support Callback
This commit is contained in:
@@ -155,6 +155,14 @@ namespace JabyEngine {
|
||||
return __syscall_function_cast(Table_B, ThreadHandle(*)(void(*)(), uint32_t*, uint32_t*))(thread_func, stack_ptr, gp);
|
||||
}
|
||||
|
||||
// No return??????
|
||||
static __always_inline void ChangeThread(ThreadHandle handle) {
|
||||
register uint32_t FuncID asm("t1") = 0x10;
|
||||
__asm__ volatile("" : "=r"(FuncID) : "r"(FuncID));
|
||||
|
||||
__syscall_function_cast(Table_B, void(*)(ThreadHandle))(handle);
|
||||
}
|
||||
|
||||
static __always_inline void InitPad(uint8_t *portA, uint32_t portASize, uint8_t *portB, uint32_t portBSize) {
|
||||
register uint32_t FuncID asm("t1") = 0x12;
|
||||
__asm__ volatile("" : "=r"(FuncID) : "r"(FuncID));
|
||||
|
Reference in New Issue
Block a user