| 163 | } |
| 164 | |
| 165 | bool __OSIsThreadActive(OSThread_t* thread) |
| 166 | { |
| 167 | cemu_assert_debug(__OSHasSchedulerLock()); |
| 168 | MPTR threadMPTR = memory_getVirtualOffsetFromPointer(thread); |
| 169 | srwlock_activeThreadList.LockWrite(); |
| 170 | bool isRunable = false; |
| 171 | for (sint32 i = 0; i < activeThreadCount; i++) |
| 172 | { |
| 173 | if (activeThread[i] == threadMPTR) |
| 174 | { |
| 175 | srwlock_activeThreadList.UnlockWrite(); |
| 176 | return true; |
| 177 | } |
| 178 | } |
| 179 | srwlock_activeThreadList.UnlockWrite(); |
| 180 | return false; |
| 181 | } |
| 182 | |
| 183 | // thread |
| 184 | OSThread_t* __currentCoreThread[3] = {}; |
no test coverage detected