OS.h and JKRDvdFile (#19)

* OS header

* JKRFile and JKRDvdFile
This commit is contained in:
Jonathan Wase
2020-12-06 06:40:34 +01:00
committed by GitHub
parent 89385fe8fd
commit 59a3d00209
12 changed files with 223 additions and 132 deletions
+3 -3
View File
@@ -62,10 +62,10 @@ void JKRThread::setCommon_heapSpecified(JKRHeap* heap, u32 stack_size, int param
this->mHeap = heap;
this->mStackSize = stack_size & 0xffffffe0;
this->mStackPtr = JKRHeap::alloc(this->mStackSize, 0x20, this->mHeap);
this->mOsThread = (OSThread*)JKRHeap::alloc(sizeof(OSThread), 0x20, this->mHeap);
this->mOSThread = (OSThread*)JKRHeap::alloc(sizeof(OSThread), 0x20, this->mHeap);
void* stackBase = (void*)((int)this->mStackPtr + this->mStackSize);
OSCreateThread(this->mOsThread, start, this, stackBase, this->mStackSize, param_3, 1);
OSCreateThread(this->mOSThread, start, this, stackBase, this->mStackSize, param_3, 1);
}
// #include "JSystem/JKernel/JKRThread/asm/func_802D1934.s"
@@ -81,7 +81,7 @@ JKRThread* JKRThread::searchThread(OSThread* thread) {
JSUListIterator<JKRThread> iterator;
for (iterator = threadList; iterator != threadList->getEnd(); iterator++) {
JKRThread* jkrThread = iterator.getObject();
if (jkrThread->mOsThread == thread) {
if (jkrThread->mOSThread == thread) {
return jkrThread;
}
}