diff options
| author | 2017-01-04 10:53:01 -0500 | |
|---|---|---|
| committer | 2017-01-05 09:40:14 -0500 | |
| commit | fd95b6ee2606da4cd47c5f2916ad3b4f86c0e0f4 (patch) | |
| tree | 5a3d1487e24f089b68358ddd8984c12e65623055 /src/core/hle/kernel/thread.cpp | |
| parent | Kernel: Use different thread statuses when a thread calls WaitSynchronization... (diff) | |
| download | yuzu-fd95b6ee2606da4cd47c5f2916ad3b4f86c0e0f4.tar.gz yuzu-fd95b6ee2606da4cd47c5f2916ad3b4f86c0e0f4.tar.xz yuzu-fd95b6ee2606da4cd47c5f2916ad3b4f86c0e0f4.zip | |
Kernel: Remove Thread::wait_objects_index and use wait_objects to hold all the objects that a thread is waiting on.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index aa99d18c7..568cef5b9 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -579,6 +579,11 @@ void Thread::SetWaitSynchronizationOutput(s32 output) { | |||
| 579 | context.cpu_registers[1] = output; | 579 | context.cpu_registers[1] = output; |
| 580 | } | 580 | } |
| 581 | 581 | ||
| 582 | s32 Thread::GetWaitObjectIndex(WaitObject* object) const { | ||
| 583 | auto match = std::find(wait_objects.rbegin(), wait_objects.rend(), object); | ||
| 584 | return std::distance(match, wait_objects.rend()) - 1; | ||
| 585 | } | ||
| 586 | |||
| 582 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 587 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 583 | 588 | ||
| 584 | void ThreadingInit() { | 589 | void ThreadingInit() { |