Kernel: Rewind on SVC change.
This commit is contained in:
parent
d494b074e8
commit
f370de84b1
3 changed files with 16 additions and 5 deletions
|
@ -605,6 +605,7 @@ void Scheduler::OnThreadStart() {
|
|||
void Scheduler::Unload() {
|
||||
Thread* thread = current_thread.get();
|
||||
if (thread) {
|
||||
thread->SetContinuousOnSVC(false);
|
||||
thread->last_running_ticks = system.CoreTiming().GetCPUTicks();
|
||||
thread->SetIsRunning(false);
|
||||
if (!thread->IsHLEThread()) {
|
||||
|
@ -697,6 +698,7 @@ void Scheduler::SwitchContext() {
|
|||
|
||||
// Save context for previous thread
|
||||
if (previous_thread) {
|
||||
previous_thread->SetContinuousOnSVC(false);
|
||||
previous_thread->last_running_ticks = system.CoreTiming().GetCPUTicks();
|
||||
if (!previous_thread->IsHLEThread()) {
|
||||
auto& cpu_core = system.ArmInterface(core_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue