| 150 | } |
| 151 | |
| 152 | JKRThread *JKRThreadSwitch::enter(JKRThread *thread, int id) |
| 153 | { |
| 154 | if (thread == nullptr) |
| 155 | { |
| 156 | return nullptr; |
| 157 | } |
| 158 | else |
| 159 | { |
| 160 | JKRThread *nextThread = JKRThread::searchThread(thread->getThreadRecord()); |
| 161 | if (nextThread != nullptr) |
| 162 | thread = nextThread; |
| 163 | |
| 164 | JKRThread::TLoad *loadInfo = thread->getLoadInfo(); |
| 165 | loadInfo->clear(); |
| 166 | loadInfo->setValid(true); |
| 167 | loadInfo->setId(id); |
| 168 | } |
| 169 | return thread; |
| 170 | } |
| 171 | |
| 172 | void JKRThreadSwitch::callback(OSThread *current, OSThread *next) |
| 173 | { |
no test coverage detected