Skip to content
Snippets Groups Projects
Commit 81d3462a authored by wwylele's avatar wwylele
Browse files

Switch context on the same thread if necessary

parent ab4b27f0
No related branches found
No related tags found
No related merge requests found
...@@ -542,8 +542,12 @@ void Reschedule() { ...@@ -542,8 +542,12 @@ void Reschedule() {
HLE::DoneRescheduling(); HLE::DoneRescheduling();
// Don't bother switching to the same thread // Don't bother switching to the same thread.
if (next == cur) // But if the thread was waiting on objects, we still need to switch it
// to perform PC modification, change state to RUNNING, etc.
// This occurs in the case when an object the thread is waiting on immediately wakes up
// the current thread before Reschedule() is called.
if (next == cur && (next == nullptr || next->waitsynch_waited == false))
return; return;
if (cur && next) { if (cur && next) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment