MCPcopy Create free account
hub / github.com/doldecomp/mkdd / searchThread

Method searchThread

libs/JSystem/JKernel/JKRThread.cpp:105–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103void *JKRThread::start(void *thread) { return static_cast<JKRThread *>(thread)->run(); }
104
105JKRThread *JKRThread::searchThread(OSThread *thread)
106{
107 JSUList<JKRThread> &threadList = getList();
108 JSUListIterator<JKRThread> iterator;
109 for (iterator = threadList.getFirst(); iterator != threadList.getEnd(); ++iterator)
110 {
111 if (iterator->getThreadRecord() == thread)
112 {
113 return iterator.getObject();
114 }
115 }
116
117 return nullptr;
118}
119
120#ifdef DEBUG
121CW_FORCE_STRINGS(JKRThread_1, "JKRThread:%x OSThread:%x Load:ID:%d (%s)\n", "sThread == 0")

Callers

nothing calls this directly

Calls 4

getThreadRecordMethod · 0.80
getFirstMethod · 0.45
getEndMethod · 0.45
getObjectMethod · 0.45

Tested by

no test coverage detected