Support Push/Pop in DS
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
|
||||
namespace JabyEngine {
|
||||
struct Thread {
|
||||
static uintptr_t get_pic() {
|
||||
return table_of_tables.processes->current_tcb->epc;
|
||||
}
|
||||
|
||||
static constexpr uint32_t idx_from_handle(SysCall::ThreadHandle thread) {
|
||||
return thread & 0xFFFF;
|
||||
}
|
||||
@@ -25,6 +29,10 @@ namespace JabyEngine {
|
||||
};
|
||||
|
||||
struct MainThread {
|
||||
static uintptr_t get_pic() {
|
||||
return table_of_tables.threads[0].epc;
|
||||
}
|
||||
|
||||
static void prepare_if_main(SysCall::ThreadHandle handle) {
|
||||
if(table_of_tables.processes->current_tcb == &table_of_tables.threads[0]) {
|
||||
Thread::prepare_next(handle);
|
||||
|
Reference in New Issue
Block a user