Created
May 11, 2015 22:57
-
-
Save Subv/8c1ce6c8866f8a90931c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp | |
| index d85fdb3..b1ba741 100644 | |
| --- a/src/core/hle/kernel/thread.cpp | |
| +++ b/src/core/hle/kernel/thread.cpp | |
| @@ -474,6 +474,10 @@ void Reschedule() { | |
| if (next && prev) { | |
| LOG_TRACE(Kernel, "context switch %u -> %u", prev->GetObjectId(), next->GetObjectId()); | |
| } else if (prev) { | |
| + // Do not reschedule if the current thread can keep running (ie. is not waiting) | |
| + if (prev->status == THREADSTATUS_RUNNING) | |
| + return; | |
| + | |
| LOG_TRACE(Kernel, "context switch %u -> idle", prev->GetObjectId()); | |
| } else { | |
| LOG_TRACE(Kernel, "context switch idle -> %u", next->GetObjectId()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment