diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-25 17:40:33 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 17:35:11 +0200 |
commit | 49ba56399563a87f29b4d89eb04b1178a571eb61 (patch) | |
tree | 3da8def77e63141936483c64f7e13bfe89e614fa /src/core/hle/kernel/svc.cpp | |
parent | HostTiming: Pause the hardware clock on pause. (diff) | |
download | yuzu-49ba56399563a87f29b4d89eb04b1178a571eb61.tar yuzu-49ba56399563a87f29b4d89eb04b1178a571eb61.tar.gz yuzu-49ba56399563a87f29b4d89eb04b1178a571eb61.tar.bz2 yuzu-49ba56399563a87f29b4d89eb04b1178a571eb61.tar.lz yuzu-49ba56399563a87f29b4d89eb04b1178a571eb61.tar.xz yuzu-49ba56399563a87f29b4d89eb04b1178a571eb61.tar.zst yuzu-49ba56399563a87f29b4d89eb04b1178a571eb61.zip |
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index d7f0dcabd..dfb032b4b 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1464,13 +1464,7 @@ static ResultCode StartThread(Core::System& system, Handle thread_handle) { ASSERT(thread->GetStatus() == ThreadStatus::Dormant); - thread->ResumeFromWait(); - - if (thread->GetStatus() == ThreadStatus::Ready) { - system.PrepareReschedule(thread->GetProcessorID()); - } - - return RESULT_SUCCESS; + return thread->Start(); } /// Called when a thread exits @@ -1478,9 +1472,8 @@ static void ExitThread(Core::System& system) { LOG_DEBUG(Kernel_SVC, "called, pc=0x{:08X}", system.CurrentArmInterface().GetPC()); auto* const current_thread = system.CurrentScheduler().GetCurrentThread(); - current_thread->Stop(); system.GlobalScheduler().RemoveThread(SharedFrom(current_thread)); - system.PrepareReschedule(); + current_thread->Stop(); } /// Sleep the current thread @@ -1500,13 +1493,13 @@ static void SleepThread(Core::System& system, s64 nanoseconds) { if (nanoseconds <= 0) { switch (static_cast<SleepType>(nanoseconds)) { case SleepType::YieldWithoutLoadBalancing: - is_redundant = current_thread->YieldSimple(); + current_thread->YieldSimple(); break; case SleepType::YieldWithLoadBalancing: - is_redundant = current_thread->YieldAndBalanceLoad(); + current_thread->YieldAndBalanceLoad(); break; case SleepType::YieldAndWaitForLoadBalancing: - is_redundant = current_thread->YieldAndWaitForLoadBalancing(); + current_thread->YieldAndWaitForLoadBalancing(); break; default: UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds); @@ -1514,7 +1507,6 @@ static void SleepThread(Core::System& system, s64 nanoseconds) { } else { current_thread->Sleep(nanoseconds); } - system.PrepareReschedule(current_thread->GetProcessorID()); } /// Wait process wide key atomic |