diff options
| author | 2015-06-17 18:07:15 -0400 | |
|---|---|---|
| committer | 2015-06-17 18:07:15 -0400 | |
| commit | 2e16edbc56c51265250269dd2d5e8b7b71335656 (patch) | |
| tree | 7634b833a4c5a647a172f29cff281920ce0f07ed /src/core/hle/kernel/mutex.cpp | |
| parent | Merge pull request #864 from linkmauve/gl-info (diff) | |
| parent | kernel: Fix svcWaitSynch to always acquire requested wait objects. (diff) | |
| download | yuzu-2e16edbc56c51265250269dd2d5e8b7b71335656.tar.gz yuzu-2e16edbc56c51265250269dd2d5e8b7b71335656.tar.xz yuzu-2e16edbc56c51265250269dd2d5e8b7b71335656.zip | |
Merge pull request #849 from bunnei/fix-waitsynch-2
Fix svcWaitSynch to correctly acquire wait objects
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 6aa73df86..edb97d324 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -23,12 +23,7 @@ static void ResumeWaitingThread(Mutex* mutex) { | |||
| 23 | // Reset mutex lock thread handle, nothing is waiting | 23 | // Reset mutex lock thread handle, nothing is waiting |
| 24 | mutex->lock_count = 0; | 24 | mutex->lock_count = 0; |
| 25 | mutex->holding_thread = nullptr; | 25 | mutex->holding_thread = nullptr; |
| 26 | 26 | mutex->WakeupAllWaitingThreads(); | |
| 27 | // Find the next waiting thread for the mutex... | ||
| 28 | auto next_thread = mutex->WakeupNextThread(); | ||
| 29 | if (next_thread != nullptr) { | ||
| 30 | mutex->Acquire(next_thread); | ||
| 31 | } | ||
| 32 | } | 27 | } |
| 33 | 28 | ||
| 34 | void ReleaseThreadMutexes(Thread* thread) { | 29 | void ReleaseThreadMutexes(Thread* thread) { |
| @@ -94,8 +89,6 @@ void Mutex::Release() { | |||
| 94 | ResumeWaitingThread(this); | 89 | ResumeWaitingThread(this); |
| 95 | } | 90 | } |
| 96 | } | 91 | } |
| 97 | |||
| 98 | HLE::Reschedule(__func__); | ||
| 99 | } | 92 | } |
| 100 | 93 | ||
| 101 | } // namespace | 94 | } // namespace |