mirror of
https://github.com/zeldaret/tp
synced 2026-07-09 14:55:32 -04:00
JKRAram and JKRAramStream (#80)
* before __register_global_object * JKRThread::sThreadList, JKRHeap::sSystemHeap, etc. * cleanup and started on JKRDvdArchive * before changing JKRCompression * more JKRDvdArchive, abs, and memset * fixed JKRArchive::setExpandSize split * JKRArchive::sCurrentDirID, JKRDvdFile::sDvdList, and matching JKRDvdFile constructors * problems * merge fixes and formatting * updated clang version in clang-format-all to version 10 * Added OSPhysicalToCached and struct for global memory * remove useless __attribute__ * changed from defines and macros to const variable and function * changed FLAG_HAS to FLAG_ON * JKRAram, linking problems * fix JKRAram * remove nonmatching stuff * renamed static data * more static class members * JKRAramStream OK * formatting Co-authored-by: Julgodis <> Co-authored-by: Pheenoh <pheenoh@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@ JKRThread::JKRThread(u32 stack_size, int message_count, int param_3) : mThreadLi
|
||||
|
||||
JKRHeap* heap = JKRHeap::findFromRoot(this);
|
||||
if (heap == NULL) {
|
||||
heap = lbl_80451370;
|
||||
heap = JKRHeap::getSystemHeap();
|
||||
}
|
||||
|
||||
setCommon_heapSpecified(heap, stack_size, param_3);
|
||||
@@ -27,7 +27,7 @@ JKRThread::JKRThread(JKRHeap* heap, u32 stack_size, int message_count, int param
|
||||
field_0x70 = 0;
|
||||
|
||||
if (heap == NULL) {
|
||||
heap = lbl_80451374;
|
||||
heap = JKRHeap::getCurrentHeap();
|
||||
}
|
||||
|
||||
setCommon_heapSpecified(heap, stack_size, param_4);
|
||||
@@ -49,8 +49,7 @@ JKRThread::JKRThread(OSThread* thread, int message_count) : mThreadListLink(this
|
||||
}
|
||||
|
||||
JKRThread::~JKRThread() {
|
||||
// lbl_8043428C = JKRThread::sThreadList
|
||||
lbl_8043428C.remove(&mThreadListLink);
|
||||
getList().remove(&mThreadListLink);
|
||||
|
||||
if (mHeap) {
|
||||
BOOL result = OSIsThreadTerminated(mThreadRecord);
|
||||
@@ -69,7 +68,7 @@ void JKRThread::setCommon_mesgQueue(JKRHeap* heap, int message_count) {
|
||||
mMessages = (OSMessage*)JKRHeap::alloc(mMessageCount * sizeof(OSMessage), 0, heap);
|
||||
|
||||
OSInitMessageQueue(&mMessageQueue, mMessages, mMessageCount);
|
||||
lbl_8043428C.append(&mThreadListLink);
|
||||
getList().append(&mThreadListLink);
|
||||
|
||||
mCurrentHeap = NULL;
|
||||
mCurrentHeapError = NULL;
|
||||
@@ -91,9 +90,9 @@ void* JKRThread::start(void* param) {
|
||||
}
|
||||
|
||||
JKRThread* JKRThread::searchThread(OSThread* thread) {
|
||||
JSUList<JKRThread>* threadList = JKRThread::getList();
|
||||
JSUList<JKRThread>& threadList = getList();
|
||||
JSUListIterator<JKRThread> iterator;
|
||||
for (iterator = threadList; iterator != threadList->getEnd(); ++iterator) {
|
||||
for (iterator = threadList.getFirst(); iterator != threadList.getEnd(); ++iterator) {
|
||||
if (iterator->getThreadRecord() == thread) {
|
||||
return iterator.getObject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user