mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
When creating threads, etc. restore thread ready.
The old thread was sticking in the RUNNING state.
This commit is contained in:
parent
dd8002a42c
commit
7530a0b6fd
1 changed files with 6 additions and 0 deletions
|
@ -2233,7 +2233,13 @@ void __KernelSwitchContext(Thread *target, const char *reason)
|
|||
// Profile on Windows shows this takes time, skip it.
|
||||
if (DEBUG_LEVEL <= MAX_LOGLEVEL)
|
||||
oldName = cur->GetName();
|
||||
|
||||
if (cur->isRunning())
|
||||
cur->nt.status = (cur->nt.status | THREADSTATUS_READY) & ~THREADSTATUS_RUNNING;
|
||||
}
|
||||
if (target && target->isRunning())
|
||||
cur->nt.status = (cur->nt.status | THREADSTATUS_RUNNING) & ~THREADSTATUS_READY;
|
||||
|
||||
currentThread = target->GetUID();
|
||||
__KernelLoadContext(&target->context);
|
||||
DEBUG_LOG(HLE,"Context switched: %s -> %s (%s) (%i - pc: %08x -> %i - pc: %08x)",
|
||||
|
|
Loading…
Add table
Reference in a new issue