| 109 | } |
| 110 | |
| 111 | void OSThreadQueueInternal::removeThread(OSThread_t* thread, OSThreadLink* threadLink) |
| 112 | { |
| 113 | cemu_assert_debug(__OSHasSchedulerLock()); |
| 114 | size_t linkOffset = getLinkOffset(thread, threadLink); |
| 115 | _debugCheckChain(thread, threadLink); |
| 116 | if (threadLink->prev) |
| 117 | _getThreadLink(threadLink->prev.GetPtr(), linkOffset)->next = threadLink->next; |
| 118 | else |
| 119 | head = threadLink->next; |
| 120 | if (threadLink->next) |
| 121 | _getThreadLink(threadLink->next.GetPtr(), linkOffset)->prev = threadLink->prev; |
| 122 | else |
| 123 | tail = threadLink->prev; |
| 124 | |
| 125 | threadLink->next = nullptr; |
| 126 | threadLink->prev = nullptr; |
| 127 | } |
| 128 | |
| 129 | // counterpart for queueAndWait |
| 130 | // if reschedule is true then scheduler will switch to woken up thread (if it is runnable on the same core) |
no test coverage detected