Kernel: Remove Thread::wait_objects_index and use wait_objects to hold all the objects that a thread is waiting on.
This commit is contained in:
parent
cef5f45de2
commit
fd95b6ee26
4 changed files with 22 additions and 21 deletions
|
@ -579,6 +579,11 @@ void Thread::SetWaitSynchronizationOutput(s32 output) {
|
|||
context.cpu_registers[1] = output;
|
||||
}
|
||||
|
||||
s32 Thread::GetWaitObjectIndex(WaitObject* object) const {
|
||||
auto match = std::find(wait_objects.rbegin(), wait_objects.rend(), object);
|
||||
return std::distance(match, wait_objects.rend()) - 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ThreadingInit() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue