From 9046d4a5485452802b756869b7d27056ba9ea9d7 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 24 Nov 2019 20:15:51 -0500 Subject: kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154) * kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details. --- src/core/hle/kernel/server_session.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/core/hle/kernel/server_session.h') diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h index 738df30f8..8a65647b6 100644 --- a/src/core/hle/kernel/server_session.h +++ b/src/core/hle/kernel/server_session.h @@ -38,6 +38,9 @@ class Thread; */ class ServerSession final : public WaitObject { public: + explicit ServerSession(KernelCore& kernel); + ~ServerSession() override; + std::string GetTypeName() const override { return "ServerSession"; } @@ -59,7 +62,7 @@ public: return parent.get(); } - using SessionPair = std::pair, SharedPtr>; + using SessionPair = std::pair, std::shared_ptr>; /** * Creates a pair of ServerSession and an associated ClientSession. @@ -69,7 +72,7 @@ public: * @return The created session tuple */ static SessionPair CreateSessionPair(KernelCore& kernel, const std::string& name = "Unknown", - SharedPtr client_port = nullptr); + std::shared_ptr client_port = nullptr); /** * Sets the HLE handler for the session. This handler will be called to service IPC requests @@ -85,7 +88,7 @@ public: * @param thread Thread that initiated the request. * @returns ResultCode from the operation. */ - ResultCode HandleSyncRequest(SharedPtr thread); + ResultCode HandleSyncRequest(std::shared_ptr thread); bool ShouldWait(const Thread* thread) const override; @@ -118,9 +121,6 @@ public: } private: - explicit ServerSession(KernelCore& kernel); - ~ServerSession() override; - /** * Creates a server session. The server session can have an optional HLE handler, * which will be invoked to handle the IPC requests that this session receives. @@ -128,8 +128,8 @@ private: * @param name Optional name of the server session. * @return The created server session */ - static ResultVal> Create(KernelCore& kernel, - std::string name = "Unknown"); + static ResultVal> Create(KernelCore& kernel, + std::string name = "Unknown"); /// Handles a SyncRequest to a domain, forwarding the request to the proper object or closing an /// object handle. @@ -147,12 +147,12 @@ private: /// List of threads that are pending a response after a sync request. This list is processed in /// a LIFO manner, thus, the last request will be dispatched first. /// TODO(Subv): Verify if this is indeed processed in LIFO using a hardware test. - std::vector> pending_requesting_threads; + std::vector> pending_requesting_threads; /// Thread whose request is currently being handled. A request is considered "handled" when a /// response is sent via svcReplyAndReceive. /// TODO(Subv): Find a better name for this. - SharedPtr currently_handling; + std::shared_ptr currently_handling; /// When set to True, converts the session to a domain at the end of the command bool convert_to_domain{}; -- cgit v1.2.3