From 34bed1ab41a296f8ccccc47d7c06ab03de2018b5 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 2 Apr 2021 18:02:10 -0700 Subject: hle: kernel: Refactor out various KThread std::shared_ptr usage. --- src/core/hle/kernel/client_session.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/hle/kernel/client_session.cpp') diff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cpp index e230f365a..13c55abe4 100644 --- a/src/core/hle/kernel/client_session.cpp +++ b/src/core/hle/kernel/client_session.cpp @@ -38,8 +38,7 @@ ResultVal> ClientSession::Create(KernelCore& kern return MakeResult(std::move(client_session)); } -ResultCode ClientSession::SendSyncRequest(std::shared_ptr thread, - Core::Memory::Memory& memory, +ResultCode ClientSession::SendSyncRequest(KThread* thread, Core::Memory::Memory& memory, Core::Timing::CoreTiming& core_timing) { // Keep ServerSession alive until we're done working with it. if (!parent->Server()) { -- cgit v1.2.3 From 269d233a9421e43c2383fe29603b3dfbdaa900e9 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 11 Apr 2021 11:41:48 -0700 Subject: hle: kernel: svc_results: Update naming.. --- src/core/hle/kernel/client_session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/kernel/client_session.cpp') diff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cpp index 13c55abe4..fa9cad498 100644 --- a/src/core/hle/kernel/client_session.cpp +++ b/src/core/hle/kernel/client_session.cpp @@ -42,7 +42,7 @@ ResultCode ClientSession::SendSyncRequest(KThread* thread, Core::Memory::Memory& Core::Timing::CoreTiming& core_timing) { // Keep ServerSession alive until we're done working with it. if (!parent->Server()) { - return ResultSessionClosedByRemote; + return ResultSessionClosed; } // Signal the server session that new data is available -- cgit v1.2.3 From 7444963bbb300cff269e410948de7fa577f5ff16 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 13 Apr 2021 17:48:37 -0700 Subject: hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. --- src/core/hle/kernel/client_session.cpp | 52 ---------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/core/hle/kernel/client_session.cpp (limited to 'src/core/hle/kernel/client_session.cpp') diff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cpp deleted file mode 100644 index fa9cad498..000000000 --- a/src/core/hle/kernel/client_session.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2019 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include "core/hle/kernel/client_session.h" -#include "core/hle/kernel/hle_ipc.h" -#include "core/hle/kernel/k_thread.h" -#include "core/hle/kernel/server_session.h" -#include "core/hle/kernel/session.h" -#include "core/hle/kernel/svc_results.h" -#include "core/hle/result.h" - -namespace Kernel { - -ClientSession::ClientSession(KernelCore& kernel) : KSynchronizationObject{kernel} {} - -ClientSession::~ClientSession() { - // This destructor will be called automatically when the last ClientSession handle is closed by - // the emulated application. - if (parent->Server()) { - parent->Server()->ClientDisconnected(); - } -} - -bool ClientSession::IsSignaled() const { - UNIMPLEMENTED(); - return true; -} - -ResultVal> ClientSession::Create(KernelCore& kernel, - std::shared_ptr parent, - std::string name) { - std::shared_ptr client_session{std::make_shared(kernel)}; - - client_session->name = std::move(name); - client_session->parent = std::move(parent); - - return MakeResult(std::move(client_session)); -} - -ResultCode ClientSession::SendSyncRequest(KThread* thread, Core::Memory::Memory& memory, - Core::Timing::CoreTiming& core_timing) { - // Keep ServerSession alive until we're done working with it. - if (!parent->Server()) { - return ResultSessionClosed; - } - - // Signal the server session that new data is available - return parent->Server()->HandleSyncRequest(std::move(thread), memory, core_timing); -} - -} // namespace Kernel -- cgit v1.2.3