eggThread matching

This commit is contained in:
robojumper
2024-05-05 14:12:22 +02:00
parent 2add8e8943
commit bd4b6b3f9c
5 changed files with 145 additions and 18 deletions
+5 -3
View File
@@ -11,9 +11,9 @@ namespace EGG {
class Thread {
public: // vtable: 0x00 | 8056ea40
/* 0x08 | 80496a60 */ virtual ~Thread();
/* 0x0C | 80496dd0 */ virtual void *run();
/* 0x10 | 800bd600 */ virtual void onEnter();
/* 0x14 | 800bd5f0 */ virtual void onExit();
/* 0x0C | 80496dd0 */ virtual void *run() { return nullptr; }
/* 0x10 | 800bd600 */ virtual void onEnter() {}
/* 0x14 | 800bd5f0 */ virtual void onExit() {}
public:
/* 0x04 */ Heap *mContainingHeap;
@@ -24,6 +24,8 @@ public:
/* 0x34 */ void *mStackMemory;
/* 0x38 */ u32 mStackSize;
/* 0x3C */ Heap *mAllocatableHeap;
// TODO from the usage in eggThread this really looks like
// it's stashed thread that's restored when switching threads
/* 0x40 */ Heap *mCurrentHeap;
/* 0x44 */ nw4r::ut::Node mLink;
+2 -2
View File
@@ -47,8 +47,8 @@ typedef struct OSThread {
OSMutexQueue mutexQueue; // at 0x2F4
struct OSThread *nextActive; // at 0x2FC
struct OSThread *prevActive; // at 0x300
u32 *stackBegin; // at 0x304
u32 *stackEnd; // at 0x308
void *stackBegin; // at 0x304
void *stackEnd; // at 0x308
s32 error; // at 0x30C
void *specific[2]; // at 0x310
} OSThread;