From 0368324f7925fe5568072299a0206ec71afee865 Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 7 Jan 2018 01:50:55 -0500 Subject: IPC Cleanup: Remove 3DS-specific code and translate copy, move and domain objects in IPC requests. Popping objects from the buffer is still not implemented. --- src/core/hle/kernel/hle_ipc.h | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'src/core/hle/kernel/hle_ipc.h') diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index b5649931d..48730a2b2 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -110,25 +110,6 @@ public: return server_session; } - /** - * Resolves a object id from the request command buffer into a pointer to an object. See the - * "HLE handle protocol" section in the class documentation for more details. - */ - SharedPtr GetIncomingHandle(u32 id_from_cmdbuf) const; - - /** - * Adds an outgoing object to the response, returning the id which should be used to reference - * it. See the "HLE handle protocol" section in the class documentation for more details. - */ - u32 AddOutgoingHandle(SharedPtr object); - - /** - * Discards all Objects from the context, invalidating all ids. This may be called after reading - * out all incoming objects, so that the buffer memory can be re-used for outgoing handles, but - * this is not required. - */ - void ClearIncomingObjects(); - void ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming); /// Populates this context with data from the requesting process/thread. @@ -158,7 +139,7 @@ public: return buffer_a_desciptors; } - const std::unique_ptr& GetDomainMessageHeader() const { + const std::unique_ptr& GetDomainMessageHeader() const { return domain_message_header; } @@ -166,17 +147,31 @@ public: return domain != nullptr; } + void AddMoveObject(SharedPtr object) { + move_objects.emplace_back(std::move(object)); + } + + void AddCopyObject(SharedPtr object) { + copy_objects.emplace_back(std::move(object)); + } + + void AddDomainObject(std::shared_ptr object) { + domain_objects.emplace_back(std::move(object)); + } + private: std::array cmd_buf; SharedPtr domain; SharedPtr server_session; // TODO(yuriks): Check common usage of this and optimize size accordingly - boost::container::small_vector, 8> request_handles; + boost::container::small_vector, 8> move_objects; + boost::container::small_vector, 8> copy_objects; + boost::container::small_vector, 8> domain_objects; std::unique_ptr command_header; std::unique_ptr handle_descriptor_header; std::unique_ptr data_payload_header; - std::unique_ptr domain_message_header; + std::unique_ptr domain_message_header; std::vector buffer_x_desciptors; std::vector buffer_a_desciptors; std::vector buffer_b_desciptors; -- cgit v1.2.3