diff options
| author | Jcw87 <Jcw87@users.noreply.github.com> | 2026-01-04 17:22:56 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-04 17:22:56 -0800 |
| commit | deb7bead205cb35ff5f57ee3d466179defde44cb (patch) | |
| tree | 22809a707a49f0253f05d45659cd142dacc0ca83 /include | |
| parent | 1400687731baedd9419dbf3972c50e3faab0f24e (diff) | |
JKernel debug (#3012)
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JKernel/JKRAram.h | 9 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRAramArchive.h | 3 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRAramBlock.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRAramHeap.h | 1 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRAramPiece.h | 20 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRAramStream.h | 8 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRArchive.h | 16 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRAssertHeap.h | 26 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRDecomp.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRDvdAramRipper.h | 1 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRDvdFile.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRDvdRipper.h | 11 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRExpHeap.h | 5 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRFile.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRFileLoader.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRHeap.h | 49 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRSolidHeap.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRThread.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JSupport/JSUList.h | 2 |
19 files changed, 111 insertions, 60 deletions
diff --git a/include/JSystem/JKernel/JKRAram.h b/include/JSystem/JKernel/JKRAram.h index 9f0e7c3083..9c8ebd88d1 100644 --- a/include/JSystem/JKernel/JKRAram.h +++ b/include/JSystem/JKernel/JKRAram.h @@ -50,14 +50,13 @@ public: static JSUList<JKRAMCommand>& getCommandList() { return sAramCommandList; } static u8 decideAramGroupId(int groupId) { - JKRAramHeap* heap; u8 finalGroupId; - if (groupId < 0) { - return getAramHeap()->getCurrentGroupID(); + finalGroupId = getAramHeap()->getCurrentGroupID(); + } else { + finalGroupId = groupId; } - - return (u8)groupId; + return finalGroupId; } static u32 getSZSBufferSize() { return sSZSBufferSize; } diff --git a/include/JSystem/JKernel/JKRAramArchive.h b/include/JSystem/JKernel/JKRAramArchive.h index 131dccbaa8..5ec395e296 100644 --- a/include/JSystem/JKernel/JKRAramArchive.h +++ b/include/JSystem/JKernel/JKRAramArchive.h @@ -12,9 +12,12 @@ class JKRFile; */ class JKRAramArchive : public JKRArchive { public: + JKRAramArchive(); JKRAramArchive(s32, JKRArchive::EMountDirection); virtual ~JKRAramArchive(); + void fixedInit(s32, JKRArchive::EMountDirection); + BOOL mountFixed(s32, JKRArchive::EMountDirection); bool open(s32); u32 getAramAddress_Entry(SDIFileEntry*); u32 getAramAddress(char const*); diff --git a/include/JSystem/JKernel/JKRAramBlock.h b/include/JSystem/JKernel/JKRAramBlock.h index e3eea99167..3945ebad89 100644 --- a/include/JSystem/JKernel/JKRAramBlock.h +++ b/include/JSystem/JKernel/JKRAramBlock.h @@ -34,7 +34,7 @@ public: /* 0x18 */ u32 mSize; /* 0x1C */ u32 mFreeSize; /* 0x20 */ u8 mGroupId; - /* 0x21 */ u8 mIsTempMemory; + /* 0x21 */ bool mIsTempMemory; /* 0x22 */ u8 padding[2]; }; diff --git a/include/JSystem/JKernel/JKRAramHeap.h b/include/JSystem/JKernel/JKRAramHeap.h index 3dd0bbd741..034a90c3eb 100644 --- a/include/JSystem/JKernel/JKRAramHeap.h +++ b/include/JSystem/JKernel/JKRAramHeap.h @@ -17,7 +17,6 @@ public: }; public: - // TODO: fix type static JSUList<JKRAramBlock> sAramList; JKRAramHeap(u32, u32); diff --git a/include/JSystem/JKernel/JKRAramPiece.h b/include/JSystem/JKernel/JKRAramPiece.h index a75f63adef..25f304f02b 100644 --- a/include/JSystem/JKernel/JKRAramPiece.h +++ b/include/JSystem/JKernel/JKRAramPiece.h @@ -42,6 +42,16 @@ public: /* 0x94 */ void* field_0x94; }; +struct JKRAramCommand { + s32 field_0x00; + void* command; + + void setting(int param_1, void* param_2) { + field_0x00 = param_1; + command = param_2; + } +}; + /** * @ingroup jsystem-jkernel * @@ -53,12 +63,6 @@ public: static JSUList<JKRAMCommand> sAramPieceCommandList; public: - struct Message { - s32 field_0x00; - JKRAMCommand* command; - }; - -public: static JKRAMCommand* prepareCommand(int, u32, u32, u32, JKRAramBlock*, JKRAMCommand::AsyncCallback); static void sendCommand(JKRAMCommand*); @@ -74,6 +78,10 @@ private: static void unlock() { OSUnlockMutex(&mMutex); } }; +inline void JKRAramPcs_SendCommand(JKRAMCommand* command) { + JKRAramPiece::sendCommand(command); +} + inline BOOL JKRAramPcs(int direction, u32 source, u32 destination, u32 length, JKRAramBlock* block) { return JKRAramPiece::orderSync(direction, source, destination, length, block); diff --git a/include/JSystem/JKernel/JKRAramStream.h b/include/JSystem/JKernel/JKRAramStream.h index a1a78a6706..47d9257229 100644 --- a/include/JSystem/JKernel/JKRAramStream.h +++ b/include/JSystem/JKernel/JKRAramStream.h @@ -77,8 +77,16 @@ inline JKRAramStreamCommand* JKRStreamToAram_Async(JSUFileInputStream *stream, u return JKRAramStream::write_StreamToAram_Async(stream, addr, size, offset, returnSize); } +inline JKRAramStreamCommand* JKRStreamToAram_Sync(JKRAramStreamCommand* command, BOOL isNonBlocking) { + return JKRAramStream::sync(command, isNonBlocking); +} + inline void JKRSetAramTransferBuffer(u8* buffer, u32 bufferSize, JKRHeap* heap) { JKRAramStream::setTransBuffer(buffer, bufferSize, heap); } +inline void JKRResetAramTransferBuffer() { + JKRAramStream::setTransBuffer(NULL, 0, NULL); +} + #endif /* JKRARAMSTREAM_H */ diff --git a/include/JSystem/JKernel/JKRArchive.h b/include/JSystem/JKernel/JKRArchive.h index ee54335886..cf4b3ef045 100644 --- a/include/JSystem/JKernel/JKRArchive.h +++ b/include/JSystem/JKernel/JKRArchive.h @@ -186,7 +186,7 @@ public: /* 0x48 */ SDIDirEntry* mNodes; /* 0x4C */ SDIFileEntry* mFiles; /* 0x50 */ s32* mExpandedSize; - /* 0x54 */ char* mStringTable; + /* 0x54 */ const char* mStringTable; protected: /* 0x58 */ u32 field_0x58; @@ -200,29 +200,27 @@ public: static JKRArchive* mount(s32, EMountMode, JKRHeap*, EMountDirection); static void* getGlbResource(u32, const char*, JKRArchive*); - static JKRCompression convertAttrToCompressionType(u32 attr) { + static JKRCompression convertAttrToCompressionType(int attr) { #define JKRARCHIVE_ATTR_COMPRESSION 0x04 #define JKRARCHIVE_ATTR_YAZ0 0x80 - JKRCompression compression; if (!(attr & JKRARCHIVE_ATTR_COMPRESSION)) { - compression = COMPRESSION_NONE; + return COMPRESSION_NONE; } else if (attr & JKRARCHIVE_ATTR_YAZ0) { - compression = COMPRESSION_YAZ0; + return COMPRESSION_YAZ0; } else { - compression = COMPRESSION_YAY0; + return COMPRESSION_YAY0; } - return compression; } static u32 getCurrentDirID() { return sCurrentDirID; } static void setCurrentDirID(u32 dirID) { sCurrentDirID = dirID; } -private: +protected: static u32 sCurrentDirID; }; -inline JKRCompression JKRConvertAttrToCompressionType(u32 attr) { +inline JKRCompression JKRConvertAttrToCompressionType(int attr) { return JKRArchive::convertAttrToCompressionType(attr); } diff --git a/include/JSystem/JKernel/JKRAssertHeap.h b/include/JSystem/JKernel/JKRAssertHeap.h index 13e84d0d1c..e57b989f05 100644 --- a/include/JSystem/JKernel/JKRAssertHeap.h +++ b/include/JSystem/JKernel/JKRAssertHeap.h @@ -2,6 +2,7 @@ #define JKRASSERTHEAP_H #include "JSystem/JKernel/JKRHeap.h" +#include "JSystem/JUtility/JUTAssert.h" /** * @ingroup jsystem-jkernel @@ -18,18 +19,19 @@ public: /* vt[06] */ virtual bool dump_sort(void); /* override */ /* vt[07] */ virtual bool dump(void); /* override */ /* vt[08] */ virtual void do_destroy(void); /* override */ - /* vt[09] */ virtual void* do_alloc(u32, int); /* override */ - /* vt[10] */ virtual void do_free(void*); /* override */ - /* vt[11] */ virtual void do_freeAll(void); /* override */ - /* vt[12] */ virtual void do_freeTail(void); /* override */ - /* vt[13] */ virtual void do_fillFreeArea(void); /* override */ - /* vt[14] */ virtual s32 do_resize(void*, u32); /* override */ - /* vt[15] */ virtual s32 do_getSize(void*); /* override */ - /* vt[16] */ virtual s32 do_getFreeSize(void); /* override */ - /* vt[17] */ virtual void* do_getMaxFreeBlock(void); /* override */ - /* vt[18] */ virtual s32 do_getTotalFreeSize(void); /* override */ - /* vt[19] */ virtual s32 do_changeGroupID(u8 param_1); /* override */ - /* vt[20] */ virtual u8 do_getCurrentGroupId(void); /* override */ + /* vt[19] */ virtual s32 do_changeGroupID(u8) { JUT_ASSERT(41, 0&& "illegal changeGroupID()"); return 0; } + /* vt[20] */ virtual u8 do_getCurrentGroupId(void) { return 0; } + /* vt[09] */ virtual void* do_alloc(u32, int alignment) { UNUSED(alignment); JUT_ASSERT(47, 0&& "illegal alloc"); return NULL; } + /* vt[10] */ virtual void do_free(void*) { JUT_ASSERT(51, 0&& "illegal free"); } + /* vt[11] */ virtual void do_freeAll(void) { JUT_ASSERT(53, 0&& "illegal freeAll()"); } + /* vt[12] */ virtual void do_freeTail(void) { JUT_ASSERT(55, 0&& "illegal freeTail()"); } + /* vt[13] */ virtual void do_fillFreeArea(void) {} + /* vt[14] */ virtual s32 do_resize(void*, u32) { JUT_ASSERT(61, 0&& "illegal resize"); return 0; } + /* vt[15] */ virtual s32 do_getSize(void*) { return 0; } + /* vt[16] */ virtual s32 do_getFreeSize(void) { return 0; } + /* vt[17] */ virtual void* do_getMaxFreeBlock(void) { return 0; } + /* vt[18] */ virtual s32 do_getTotalFreeSize(void) { return 0; } + public: static JKRAssertHeap* create(JKRHeap*); diff --git a/include/JSystem/JKernel/JKRDecomp.h b/include/JSystem/JKernel/JKRDecomp.h index c397218591..9131ecfbaa 100644 --- a/include/JSystem/JKernel/JKRDecomp.h +++ b/include/JSystem/JKernel/JKRDecomp.h @@ -82,4 +82,8 @@ inline u32 JKRDecompExpandSize(u8* pBuf) { return (pBuf[4] << 0x18) | (pBuf[5] << 0x10) | (pBuf[6] << 8) | pBuf[7]; } +inline void JKRDecompress_SendCommand(JKRDecompCommand* command) { + JKRDecomp::sendCommand(command); +} + #endif /* JKRDECOMP_H */ diff --git a/include/JSystem/JKernel/JKRDvdAramRipper.h b/include/JSystem/JKernel/JKRDvdAramRipper.h index 1e0f05ac15..110827dc0b 100644 --- a/include/JSystem/JKernel/JKRDvdAramRipper.h +++ b/include/JSystem/JKernel/JKRDvdAramRipper.h @@ -50,6 +50,7 @@ public: static JKRADCommand* callCommand_Async(JKRADCommand*); static bool syncAram(JKRADCommand*, int); + static u32 getSZSBufferSize() { return sSZSBufferSize; } static void setSZSBufferSize(u32 size) { sSZSBufferSize = size; } static bool isErrorRetry() { return errorRetry; } diff --git a/include/JSystem/JKernel/JKRDvdFile.h b/include/JSystem/JKernel/JKRDvdFile.h index faf5120097..bda9aa738a 100644 --- a/include/JSystem/JKernel/JKRDvdFile.h +++ b/include/JSystem/JKernel/JKRDvdFile.h @@ -28,7 +28,7 @@ public: u32 getFileID() const { return mFileInfo.startAddr; } DVDFileInfo* getFileInfo() { return &mFileInfo; } - int getStatus() { return DVDGetCommandBlockStatus(&mFileInfo.cb); } + int getStatus() const { return DVDGetCommandBlockStatus(&mFileInfo.cb); } public: /* vt[03] */ virtual bool open(const char*); /* override */ diff --git a/include/JSystem/JKernel/JKRDvdRipper.h b/include/JSystem/JKernel/JKRDvdRipper.h index 954c6fd097..82b9c21a2e 100644 --- a/include/JSystem/JKernel/JKRDvdRipper.h +++ b/include/JSystem/JKernel/JKRDvdRipper.h @@ -35,6 +35,7 @@ class JKRDvdRipper { public: static JSUList<JKRDMCommand> sDvdAsyncList; static u32 sSZSBufferSize; + static bool errorRetry; enum EAllocDirection { UNKNOWN_EALLOC_DIRECTION = 0, @@ -51,12 +52,20 @@ public: static void* loadToMainRAM(JKRDvdFile*, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, JKRCompression*, u32*); - static u8 isErrorRetry(void); + static bool isErrorRetry(void) { return errorRetry; } inline static u32 getSZSBufferSize() { return sSZSBufferSize; } }; // void JKRDecompressFromDVD(JKRDvdFile*, void*, u32, u32, u32, u32, u32*); + +inline void* JKRDvdToMainRam(JKRDvdFile* file, u8* dst, JKRExpandSwitch expandSwitch, u32 dstLength, + JKRHeap* heap, JKRDvdRipper::EAllocDirection allocDirection, + u32 offset, JKRCompression* compression, u32* returnSize) { + return JKRDvdRipper::loadToMainRAM(file, dst, expandSwitch, dstLength, heap, allocDirection, + offset, compression, returnSize); +} + inline void* JKRDvdToMainRam(s32 entryNum, u8* dst, JKRExpandSwitch expandSwitch, u32 dstLength, JKRHeap* heap, JKRDvdRipper::EAllocDirection allocDirection, u32 offset, JKRCompression* compression, u32* returnSize) { diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/include/JSystem/JKernel/JKRExpHeap.h index c52211c559..309b81f29a 100644 --- a/include/JSystem/JKernel/JKRExpHeap.h +++ b/include/JSystem/JKernel/JKRExpHeap.h @@ -63,7 +63,7 @@ protected: void joinTwoBlocks(CMemBlock* block); public: - s32 isEmpty(); + BOOL isEmpty(); s32 getUsedSize(u8 groupId) const; s32 getTotalUsedSize(void) const; @@ -110,6 +110,9 @@ public: static JKRExpHeap* createRoot(int maxHeaps, bool errorFlag); static JKRExpHeap* create(u32 size, JKRHeap* parent, bool errorFlag); static JKRExpHeap* create(void* ptr, u32 size, JKRHeap* parent, bool errorFlag); + + static s32 getUsedSize_(JKRExpHeap* heap) { return heap->mSize - heap->getTotalFreeSize(); } + static void* getState_(TState* state) { return getState_buf_(state); } }; inline JKRExpHeap* JKRCreateExpHeap(u32 size, JKRHeap* parent, bool errorFlag) { diff --git a/include/JSystem/JKernel/JKRFile.h b/include/JSystem/JKernel/JKRFile.h index 896ddb4976..7667bb6527 100644 --- a/include/JSystem/JKernel/JKRFile.h +++ b/include/JSystem/JKernel/JKRFile.h @@ -12,7 +12,7 @@ public: JKRFile() : mIsAvailable(false) {} virtual ~JKRFile() {} - s32 read(void*, s32, s32); + void read(void*, s32, s32); bool isAvailable() const { return mIsAvailable; } diff --git a/include/JSystem/JKernel/JKRFileLoader.h b/include/JSystem/JKernel/JKRFileLoader.h index a7a284b469..7e3e4cd1c5 100644 --- a/include/JSystem/JKernel/JKRFileLoader.h +++ b/include/JSystem/JKernel/JKRFileLoader.h @@ -14,8 +14,8 @@ public: JKRFileLoader(void); virtual ~JKRFileLoader(); - bool isMounted() const { return this->mIsMounted; } - u32 getVolumeType() const { return this->mVolumeType; } + bool isMounted() { return this->mIsMounted; } + u32 getVolumeType() { return this->mVolumeType; } public: /* vt[03] */ virtual void unmount(void); diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index d44088bc1b..650ee57663 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -8,10 +8,12 @@ class JKRHeap; typedef void (*JKRErrorHandler)(void*, u32, int); -extern bool data_804508B0; -extern u8 data_804508B1; -extern u8 data_804508B2; -extern u8 data_804508B3; +extern u8 JKRValue_DEBUGFILL_NOTUSE; +extern u8 JKRValue_DEBUGFILL_NEW; +extern u8 JKRValue_DEBUGFILL_DELETE; + +extern s32 fillcheck_dispcount; +extern bool data_8074A8D0_debug; /** * @ingroup jsystem-jkernel @@ -19,6 +21,9 @@ extern u8 data_804508B3; */ class JKRHeap : public JKRDisposer { public: + typedef void (*JKRAllocCallback)(u32, int, JKRHeap*, void*); + typedef void (*JKRFreeCallback)(void*, JKRHeap*); + class TState { public: /* 0x00 */ u32 mUsedSize; @@ -54,6 +59,7 @@ public: void* getMaxFreeBlock(); s32 getTotalFreeSize(); s32 changeGroupID(u8 newGroupId); + u8 getCurrentGroupId(); u32 getMaxAllocatableSize(int alignment); JKRHeap* find(void* ptr) const; @@ -96,13 +102,13 @@ public: void* getEndAddr() { return (void*)mEnd; } u32 getSize() const { return mSize; } bool getErrorFlag() const { return mErrorFlag; } - void callErrorHandler(JKRHeap* heap, u32 size, int alignment) { + void callErrorHandler(void* heap, u32 size, int alignment) { if (mErrorHandler) { (*mErrorHandler)(heap, size, alignment); } } - JKRHeap* getParent() const { + JKRHeap* getParent() { JSUTree<JKRHeap>* parent = mChildTree.getParent(); return parent->getObject(); } @@ -110,8 +116,8 @@ public: JSUTree<JKRHeap>& getHeapTree() { return mChildTree; } void appendDisposer(JKRDisposer* disposer) { mDisposerList.append(&disposer->mLink); } void removeDisposer(JKRDisposer* disposer) { mDisposerList.remove(&disposer->mLink); } - void lock() { OSLockMutex(&mMutex); } - void unlock() { OSUnlockMutex(&mMutex); } + void lock() const { OSLockMutex(const_cast<OSMutex*>(&mMutex)); } + void unlock() const { OSUnlockMutex(const_cast<OSMutex*>(&mMutex)); } u32 getHeapSize() { return mSize; } u8 getCurrentGroupId() { return 0; } @@ -133,6 +139,7 @@ protected: public: static bool initArena(char** memory, u32* size, int maxHeaps); + static bool initArena2(char** memory, u32* size, int maxHeaps); static void* alloc(u32 size, int alignment, JKRHeap* heap); static void free(void* ptr, JKRHeap* heap); static s32 resize(void* ptr, u32 size, JKRHeap* heap); @@ -144,8 +151,11 @@ public: static bool checkMemoryFilled(void* src, u32 size, u8 value); static JKRErrorHandler setErrorHandler(JKRErrorHandler errorHandler); + static void fillMemory(u8*, u32, u8); + static bool checkMemoryFilled(u8*, u32, u8); - static void setDefaultDebugFill(bool status) { data_804508B0 = status; } + static bool isDefaultDebugFill() { return sDefaultFillFlag; } + static void setDefaultDebugFill(bool status) { sDefaultFillFlag = status; } static void* getCodeStart(void) { return mCodeStart; } static void* getCodeEnd(void) { return mCodeEnd; } static void* getUserRamStart(void) { return mUserRamStart; } @@ -166,13 +176,16 @@ public: state->mCheckCode = checkCode; } static void* getState_buf_(TState* state) { return &state->mBuf; } - static void* getState_(TState* state) { return getState_buf_(state); } static void* mCodeStart; static void* mCodeEnd; static void* mUserRamStart; static void* mUserRamEnd; static u32 mMemorySize; + static JKRAllocCallback sAllocCallback; + static JKRFreeCallback sFreeCallback; + + static bool sDefaultFillFlag; static JKRHeap* sRootHeap; @@ -206,8 +219,7 @@ inline void* JKRAllocFromHeap(JKRHeap* heap, u32 size, int alignment) { } inline void* JKRAllocFromSysHeap(u32 size, int alignment) { - JKRHeap* systemHeap = JKRHeap::getSystemHeap(); - return systemHeap->alloc(size, alignment); + return JKRHeap::getSystemHeap()->alloc(size, alignment); } inline void JKRFreeToHeap(JKRHeap* heap, void* ptr) { @@ -215,14 +227,17 @@ inline void JKRFreeToHeap(JKRHeap* heap, void* ptr) { } inline void JKRFreeToSysHeap(void* ptr) { - JKRHeap* systemHeap = JKRHeap::getSystemHeap(); - systemHeap->free(ptr); + JKRHeap::getSystemHeap()->free(ptr); } inline void JKRFree(void* ptr) { JKRHeap::free(ptr, NULL); } +inline void JKRFillMemory(u8* dst, u32 size, u8 val) { + JKRHeap::fillMemory(dst, size, val); +} + inline JKRHeap* JKRGetSystemHeap() { return JKRHeap::getSystemHeap(); } @@ -268,9 +283,9 @@ inline JKRHeap* JKRGetRootHeap2() { } #if DEBUG -inline void JKRSetDebugFillNotuse(u8 status) { data_804508B1 = status; } -inline void JKRSetDebugFillNew(u8 status) { data_804508B2 = status; } -inline void JKRSetDebugFillDelete(u8 status) { data_804508B3 = status; } +inline void JKRSetDebugFillNotuse(u8 status) { JKRValue_DEBUGFILL_NOTUSE = status; } +inline void JKRSetDebugFillNew(u8 status) { JKRValue_DEBUGFILL_NEW = status; } +inline void JKRSetDebugFillDelete(u8 status) { JKRValue_DEBUGFILL_DELETE = status; } #endif #endif /* JKRHEAP_H */ diff --git a/include/JSystem/JKernel/JKRSolidHeap.h b/include/JSystem/JKernel/JKRSolidHeap.h index bc2a1ffc15..1897fd5aec 100644 --- a/include/JSystem/JKernel/JKRSolidHeap.h +++ b/include/JSystem/JKernel/JKRSolidHeap.h @@ -59,6 +59,8 @@ public: s32 adjustSize(void); static JKRSolidHeap* create(u32, JKRHeap*, bool); + + static void* getState_(TState* state) { return getState_buf_(state); } }; inline JKRSolidHeap* JKRCreateSolidHeap(u32 param_0, JKRHeap* heap, bool param_2) { diff --git a/include/JSystem/JKernel/JKRThread.h b/include/JSystem/JKernel/JKRThread.h index b82a22ae9b..9fb515fe7b 100644 --- a/include/JSystem/JKernel/JKRThread.h +++ b/include/JSystem/JKernel/JKRThread.h @@ -117,7 +117,7 @@ private: /* 0x28 */ JKRHeap* mHeap; /* 0x2C */ OSThread* mThreadRecord; /* 0x30 */ OSMessageQueue mMessageQueue; - /* 0x50 */ OSMessage* mMessages; + /* 0x50 */ OSMessage* mMesgBuffer; /* 0x54 */ s32 mMessageCount; /* 0x58 */ void* mStackMemory; /* 0x5C */ u32 mStackSize; @@ -159,7 +159,7 @@ public: private: static JKRThreadSwitch* sManager; static u32 sTotalCount; - static u32 sTotalStart; + static u64 sTotalStart; static JKRThreadSwitch_PreCallback mUserPreCallback; static JKRThreadSwitch_PostCallback mUserPostCallback; diff --git a/include/JSystem/JSupport/JSUList.h b/include/JSystem/JSupport/JSUList.h index 8d42762d2c..682dd52e42 100644 --- a/include/JSystem/JSupport/JSUList.h +++ b/include/JSystem/JSupport/JSUList.h @@ -137,7 +137,7 @@ public: return *this; } - T* getObject() { return this->mLink->getObject(); } + T* getObject() const { return this->mLink->getObject(); } bool operator==(JSULink<T> const* other) const { return this->mLink == other; } bool operator!=(JSULink<T> const* other) const { return this->mLink != other; } |
