diff options
author | bunnei <bunneidev@gmail.com> | 2018-01-24 00:03:09 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-25 04:18:56 +0100 |
commit | 27bad0598a3ddce0417388c3945368200150d413 (patch) | |
tree | 8afc27be2a01d80cc592a698632b2fbcae71d8a5 /src/core/hle/kernel/server_session.h | |
parent | hle: Remove Domain and SyncObject kernel objects. (diff) | |
download | yuzu-27bad0598a3ddce0417388c3945368200150d413.tar yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.gz yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.bz2 yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.lz yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.xz yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.zst yuzu-27bad0598a3ddce0417388c3945368200150d413.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/server_session.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h index 6ff4ef8c1..144692106 100644 --- a/src/core/hle/kernel/server_session.h +++ b/src/core/hle/kernel/server_session.h @@ -79,7 +79,10 @@ public: std::string name; ///< The name of this session (optional) std::shared_ptr<Session> parent; ///< The parent session, which links to the client endpoint. std::shared_ptr<SessionRequestHandler> - hle_handler; ///< This session's HLE request handler (optional) + hle_handler; ///< This session's HLE request handler (applicable when not a domain) + + /// This is the list of domain request handlers (after conversion to a domain) + std::vector<std::shared_ptr<SessionRequestHandler>> domain_request_handlers; /// 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. @@ -91,6 +94,16 @@ public: /// TODO(Subv): Find a better name for this. SharedPtr<Thread> currently_handling; + /// Returns true if the session has been converted to a domain, otherwise False + bool IsDomain() const { + return !domain_request_handlers.empty(); + } + + /// Converts the session to a domain at the end of the current command + void ConvertToDomain() { + convert_to_domain = true; + } + private: ServerSession(); ~ServerSession() override; @@ -102,6 +115,9 @@ private: * @return The created server session */ static ResultVal<SharedPtr<ServerSession>> Create(std::string name = "Unknown"); + + /// When set to True, converts the session to a domain at the end of the command + bool convert_to_domain{}; }; /** |