diff options
| author | 2016-05-29 12:52:29 +0300 | |
|---|---|---|
| committer | 2016-05-30 07:34:53 +0300 | |
| commit | 81d3462a199dbaa0c95faa203918cd21d1da1277 (patch) | |
| tree | 68f17aab52e74156f74e1ace76e5513b04034f7b /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #1692 from Subv/rm_getpointer2 (diff) | |
| download | yuzu-81d3462a199dbaa0c95faa203918cd21d1da1277.tar.gz yuzu-81d3462a199dbaa0c95faa203918cd21d1da1277.tar.xz yuzu-81d3462a199dbaa0c95faa203918cd21d1da1277.zip | |
Switch context on the same thread if necessary
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 3f6bec5fa..db2728a7b 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -542,8 +542,12 @@ void Reschedule() { | |||
| 542 | 542 | ||
| 543 | HLE::DoneRescheduling(); | 543 | HLE::DoneRescheduling(); |
| 544 | 544 | ||
| 545 | // Don't bother switching to the same thread | 545 | // Don't bother switching to the same thread. |
| 546 | if (next == cur) | 546 | // But if the thread was waiting on objects, we still need to switch it |
| 547 | // to perform PC modification, change state to RUNNING, etc. | ||
| 548 | // This occurs in the case when an object the thread is waiting on immediately wakes up | ||
| 549 | // the current thread before Reschedule() is called. | ||
| 550 | if (next == cur && (next == nullptr || next->waitsynch_waited == false)) | ||
| 547 | return; | 551 | return; |
| 548 | 552 | ||
| 549 | if (cur && next) { | 553 | if (cur && next) { |