aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-11-23 13:24:39 -0500
committerGitHub <noreply@github.com>2019-11-23 13:24:39 -0500
commit16a9d0d6e0a04c0dca5a531e59025a87501aa814 (patch)
tree7d8189083964982abf5e48e3dd8e87e504ca7ab6 /src/core/hle/kernel/thread.cpp
parent87748a89655da28dc4308400ef9bcb7ff6e16e52 (diff)
parenteb0376720627f3e9231fa939b38409d8793795d6 (diff)
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.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index ab0e82ac2a..7166e9b07a 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -309,8 +309,16 @@ void Thread::UpdatePriority() {
return;
}
+ if (GetStatus() == ThreadStatus::WaitCondVar) {
+ owner_process->RemoveConditionVariableThread(this);
+ }
+
SetCurrentPriority(new_priority);
+ if (GetStatus() == ThreadStatus::WaitCondVar) {
+ owner_process->InsertConditionVariableThread(this);
+ }
+
if (!lock_owner) {
return;
}