Port stackcheck.c from oot decomp

This commit is contained in:
rozlette
2020-01-12 20:18:31 -06:00
parent 76c3d660a9
commit 30daa16255
13 changed files with 203 additions and 81 deletions
+4 -4
View File
@@ -1,14 +1,14 @@
#include <ultra64.h>
#include <global.h>
UNK_RET start(void) {
thread_info_init(&bootThreadInfo, bootStack, &bootStack[1024], 0, -1, bootThreadName);
void start(void) {
StackCheck_Init(&bootStackEntry, (u32)bootStack, (u32)&bootStack[1024], 0, -1, bootThreadName);
osMemSize = func_8008D350();
func_800818F4();
osInitialize();
osUnmapTLBAll();
D_80096B40 = func_80092920();
thread_info_init(&idleTreadInfo, idleStack, &idleStack[1024], 0, 256, idleThreadName);
osCreateThread(&idleOSThread, 1, (osCreateThread_func)Idle_ThreadEntry, 0, &idleTreadInfo, 12);
StackCheck_Init(&idleStackEntry, (u32)idleStack, (u32)&idleStack[1024], 0, 256, idleThreadName);
osCreateThread(&idleOSThread, 1, (osCreateThread_func)Idle_ThreadEntry, 0, &idleStack[1024], 12);
osStartThread(&idleOSThread);
}