summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-11-23 19:24:39 +0100
committerGitHub <noreply@github.com>2019-11-23 19:24:39 +0100
commit6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2 (patch)
tree7d8189083964982abf5e48e3dd8e87e504ca7ab6 /src/core/hle/kernel/thread.cpp
parentMerge pull request #3141 from ReinUsesLisp/gl-position (diff)
parentKernel: Optimize condition variable threads management. (diff)
downloadyuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar
yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.gz
yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.bz2
yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.lz
yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.xz
yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.tar.zst
yuzu-6a3fc5d2ff2732e0392db56b04ff0c4e2c167bf2.zip
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 ab0e82ac2..7166e9b07 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;
}