diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2021-10-04 06:09:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 06:09:08 +0200 |
commit | 01f79d638fbbca54280ab9b5840e5a483b7ceb69 (patch) | |
tree | 6520b5f70f2d3132031610e39d6d7c50aa268838 /src/core/hle/kernel/svc.cpp | |
parent | Merge pull request #7122 from Morph1984/update-qt (diff) | |
parent | Fix KShareMemory object leak (diff) | |
download | yuzu-01f79d638fbbca54280ab9b5840e5a483b7ceb69.tar yuzu-01f79d638fbbca54280ab9b5840e5a483b7ceb69.tar.gz yuzu-01f79d638fbbca54280ab9b5840e5a483b7ceb69.tar.bz2 yuzu-01f79d638fbbca54280ab9b5840e5a483b7ceb69.tar.lz yuzu-01f79d638fbbca54280ab9b5840e5a483b7ceb69.tar.xz yuzu-01f79d638fbbca54280ab9b5840e5a483b7ceb69.tar.zst yuzu-01f79d638fbbca54280ab9b5840e5a483b7ceb69.zip |
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 62fb06c45..f98f24a60 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -320,17 +320,19 @@ static ResultCode SendSyncRequest(Core::System& system, Handle handle) { auto& kernel = system.Kernel(); - KScopedAutoObject session = - kernel.CurrentProcess()->GetHandleTable().GetObject<KClientSession>(handle); - R_UNLESS(session.IsNotNull(), ResultInvalidHandle); - LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName()); - auto thread = kernel.CurrentScheduler()->GetCurrentThread(); { KScopedSchedulerLock lock(kernel); thread->SetState(ThreadState::Waiting); thread->SetWaitReasonForDebugging(ThreadWaitReasonForDebugging::IPC); - session->SendSyncRequest(thread, system.Memory(), system.CoreTiming()); + + { + KScopedAutoObject session = + kernel.CurrentProcess()->GetHandleTable().GetObject<KClientSession>(handle); + R_UNLESS(session.IsNotNull(), ResultInvalidHandle); + LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName()); + session->SendSyncRequest(thread, system.Memory(), system.CoreTiming()); + } } KSynchronizationObject* dummy{}; |