Rename ThreadMonitor to ThreadMgr

This commit is contained in:
Sean Miller
2026-04-16 13:15:04 +01:00
parent 9eb87eb75e
commit 0aeec983a4
6 changed files with 19 additions and 19 deletions
@@ -1,12 +1,12 @@
#include "egg/core/eggThreadMonitor.h"
#include "egg/core/eggThreadMgr.h"
#include "rvl/OS.h"
namespace EGG {
ThreadMonitor *ThreadMonitor::sInstance; // Never initialized
ThreadMgr *ThreadMgr::sInstance; // Never initialized
s32 ThreadMonitor::getThreadIndex(OSThread *thread) {
s32 ThreadMgr::getThreadIndex(OSThread *thread) {
for (s32 i = 0; i < mThreadCount; i++) {
if (mThreadList[i].mThread == thread) {
return i;
@@ -15,7 +15,7 @@ s32 ThreadMonitor::getThreadIndex(OSThread *thread) {
return -1;
}
s32 ThreadMonitor::doRegisterThread(OSThread *thread) {
s32 ThreadMgr::doRegisterThread(OSThread *thread) {
if (mThreadCount != mMaxThreads) {
s32 i = mThreadCount;
@@ -37,7 +37,7 @@ s32 ThreadMonitor::doRegisterThread(OSThread *thread) {
return -1;
}
void ThreadMonitor::sortByPriority() {
void ThreadMgr::sortByPriority() {
// Selection sort on thread priority
for (s32 i = 0; i < mThreadCount - 1; i++) {
OSPriority minPrio = 31;
@@ -59,7 +59,7 @@ void ThreadMonitor::sortByPriority() {
}
}
void ThreadMonitor::registerThread(OSThread *thread, UnknownStruct arg) {
void ThreadMgr::registerThread(OSThread *thread, UnknownStruct arg) {
s32 i = getThreadIndex(thread);
if (i == -1) {
i = doRegisterThread(thread);
+3 -3
View File
@@ -1,10 +1,10 @@
#include "m/m_thread.h"
#include "egg/core/eggThreadMonitor.h"
#include "egg/core/eggThreadMgr.h"
#include "rvl/OS/OSThread.h"
void mThread::registerThread(OSThread *thread, void *threadArg) {
if (threadArg && EGG::ThreadMonitor::getInstance()) {
EGG::ThreadMonitor::getInstance()->registerThread(thread, *(EGG::UnknownStruct *)threadArg);
if (threadArg && EGG::ThreadMgr::getInstance()) {
EGG::ThreadMgr::getInstance()->registerThread(thread, *(EGG::UnknownStruct *)threadArg);
}
}