diff options
author | Subv <subv2112@gmail.com> | 2015-07-21 00:15:54 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-07-21 00:15:54 +0200 |
commit | 275aaeef9c94db25a4a52cfcda1dac0dcc9e6c06 (patch) | |
tree | 0d16a2c8a80e8d68f6de41564cde6a141402f946 /src/core | |
parent | Merge pull request #939 from Subv/queryprocmem (diff) | |
download | yuzu-275aaeef9c94db25a4a52cfcda1dac0dcc9e6c06.tar yuzu-275aaeef9c94db25a4a52cfcda1dac0dcc9e6c06.tar.gz yuzu-275aaeef9c94db25a4a52cfcda1dac0dcc9e6c06.tar.bz2 yuzu-275aaeef9c94db25a4a52cfcda1dac0dcc9e6c06.tar.lz yuzu-275aaeef9c94db25a4a52cfcda1dac0dcc9e6c06.tar.xz yuzu-275aaeef9c94db25a4a52cfcda1dac0dcc9e6c06.tar.zst yuzu-275aaeef9c94db25a4a52cfcda1dac0dcc9e6c06.zip |
Diffstat (limited to 'src/core')
-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 64166ab99..8b49fc7df 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -217,6 +217,14 @@ static void SwitchContext(Thread* new_thread) { new_thread->context.pc -= thumb_mode ? 2 : 4; } + // Clean up the thread's wait_objects, they'll be restored if needed during + // the svcWaitSynchronization call + for (int i = 0; i < new_thread->wait_objects.size(); ++i) { + SharedPtr<WaitObject> object = new_thread->wait_objects[i]; + object->RemoveWaitingThread(new_thread); + } + new_thread->wait_objects.clear(); + ready_queue.remove(new_thread->current_priority, new_thread); new_thread->status = THREADSTATUS_RUNNING; |