From 5feda37688cafee8054910cd05916742c8263f89 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 9 Dec 2023 11:25:21 -0500 Subject: service: populate pid and handle table from client --- src/core/hle/service/hle_ipc.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/core/hle/service/hle_ipc.h') diff --git a/src/core/hle/service/hle_ipc.h b/src/core/hle/service/hle_ipc.h index 4436f4f83..18d464c63 100644 --- a/src/core/hle/service/hle_ipc.h +++ b/src/core/hle/service/hle_ipc.h @@ -38,6 +38,7 @@ namespace Kernel { class KAutoObject; class KernelCore; class KHandleTable; +class KProcess; class KServerSession; class KThread; } // namespace Kernel @@ -195,8 +196,7 @@ public: } /// Populates this context with data from the requesting process/thread. - Result PopulateFromIncomingCommandBuffer(const Kernel::KHandleTable& handle_table, - u32_le* src_cmdbuf); + Result PopulateFromIncomingCommandBuffer(Kernel::KProcess& process, u32_le* src_cmdbuf); /// Writes data from this context back to the requesting process/thread. Result WriteToOutgoingCommandBuffer(Kernel::KThread& requesting_thread); @@ -359,6 +359,10 @@ public: return *thread; } + Kernel::KHandleTable& GetClientHandleTable() { + return *client_handle_table; + } + [[nodiscard]] std::shared_ptr GetManager() const { return manager.lock(); } @@ -374,12 +378,12 @@ public: private: friend class IPC::ResponseBuilder; - void ParseCommandBuffer(const Kernel::KHandleTable& handle_table, u32_le* src_cmdbuf, - bool incoming); + void ParseCommandBuffer(Kernel::KProcess& process, u32_le* src_cmdbuf, bool incoming); std::array cmd_buf; Kernel::KServerSession* server_session{}; - Kernel::KThread* thread; + Kernel::KHandleTable* client_handle_table{}; + Kernel::KThread* thread{}; std::vector incoming_move_handles; std::vector incoming_copy_handles; -- cgit v1.2.3