diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-26 00:43:28 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 17:35:14 +0200 |
commit | 15a79eb0d7abe752a9a55d0cfa7ea220e17318b7 (patch) | |
tree | 863357ab4be1ff9a72804c40455d6a4c4c493acd /src/core/hle/kernel/server_session.cpp | |
parent | SVC: Correct ArbitrateUnlock (diff) | |
download | yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.tar yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.tar.gz yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.tar.bz2 yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.tar.lz yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.tar.xz yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.tar.zst yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/server_session.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 25438b86b..05516a453 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -19,6 +19,7 @@ #include "core/hle/kernel/process.h" #include "core/hle/kernel/server_session.h" #include "core/hle/kernel/session.h" +#include "core/hle/kernel/scheduler.h" #include "core/hle/kernel/thread.h" #include "core/memory.h" @@ -168,9 +169,12 @@ ResultCode ServerSession::CompleteSyncRequest() { } // Some service requests require the thread to block - if (!context.IsThreadWaiting()) { - context.GetThread().ResumeFromWait(); - context.GetThread().SetWaitSynchronizationResult(result); + { + SchedulerLock lock(kernel); + if (!context.IsThreadWaiting()) { + context.GetThread().ResumeFromWait(); + context.GetThread().SetSynchronizationResults(nullptr, result); + } } request_queue.Pop(); @@ -180,8 +184,9 @@ ResultCode ServerSession::CompleteSyncRequest() { ResultCode ServerSession::HandleSyncRequest(std::shared_ptr<Thread> thread, Core::Memory::Memory& memory) { - Core::System::GetInstance().CoreTiming().ScheduleEvent(20000, request_event, {}); - return QueueSyncRequest(std::move(thread), memory); + ResultCode result = QueueSyncRequest(std::move(thread), memory); + Core::System::GetInstance().CoreTiming().ScheduleEvent(0, request_event, {}); + return result; } } // namespace Kernel |