mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-24 02:29:20 +01:00
Switch context on the same thread if necessary
This commit is contained in:
parent
ab4b27f0f5
commit
81d3462a19
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user