diff options
| author | 2019-11-23 13:24:39 -0500 | |
|---|---|---|
| committer | 2019-11-23 13:24:39 -0500 | |
| commit | 6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2 (patch) | |
| tree | 7d8189083964982abf5e48e3dd8e87e504ca7ab6 /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #3141 from ReinUsesLisp/gl-position (diff) | |
| parent | Kernel: Optimize condition variable threads management. (diff) | |
| download | yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.gz yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.xz yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.zip | |
Merge pull request #3114 from FernandoS27/cond-var
Kernel: Correct behavior of Condition Variables to be more similar to real hardware.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index ab0e82ac2..7166e9b07 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -309,8 +309,16 @@ void Thread::UpdatePriority() { | |||
| 309 | return; | 309 | return; |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | if (GetStatus() == ThreadStatus::WaitCondVar) { | ||
| 313 | owner_process->RemoveConditionVariableThread(this); | ||
| 314 | } | ||
| 315 | |||
| 312 | SetCurrentPriority(new_priority); | 316 | SetCurrentPriority(new_priority); |
| 313 | 317 | ||
| 318 | if (GetStatus() == ThreadStatus::WaitCondVar) { | ||
| 319 | owner_process->InsertConditionVariableThread(this); | ||
| 320 | } | ||
| 321 | |||
| 314 | if (!lock_owner) { | 322 | if (!lock_owner) { |
| 315 | return; | 323 | return; |
| 316 | } | 324 | } |