diff options
author | Subv <subv2112@gmail.com> | 2016-12-01 05:28:31 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-12-01 05:28:31 +0100 |
commit | 2eceee3a4cc2786dae4e9b80a8b5f3bb666d3fc6 (patch) | |
tree | 4a7069d46afb5655af9f091c09041211653fb75f /src/core/hle/kernel | |
parent | A bit of a redesign. (diff) | |
download | yuzu-2eceee3a4cc2786dae4e9b80a8b5f3bb666d3fc6.tar yuzu-2eceee3a4cc2786dae4e9b80a8b5f3bb666d3fc6.tar.gz yuzu-2eceee3a4cc2786dae4e9b80a8b5f3bb666d3fc6.tar.bz2 yuzu-2eceee3a4cc2786dae4e9b80a8b5f3bb666d3fc6.tar.lz yuzu-2eceee3a4cc2786dae4e9b80a8b5f3bb666d3fc6.tar.xz yuzu-2eceee3a4cc2786dae4e9b80a8b5f3bb666d3fc6.tar.zst yuzu-2eceee3a4cc2786dae4e9b80a8b5f3bb666d3fc6.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/client_port.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/kernel/client_port.h | 32 | ||||
-rw-r--r-- | src/core/hle/kernel/client_session.cpp | 3 | ||||
-rw-r--r-- | src/core/hle/kernel/client_session.h | 17 | ||||
-rw-r--r-- | src/core/hle/kernel/kernel.h | 34 | ||||
-rw-r--r-- | src/core/hle/kernel/server_session.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/kernel/server_session.h | 9 |
7 files changed, 46 insertions, 51 deletions
diff --git a/src/core/hle/kernel/client_port.cpp b/src/core/hle/kernel/client_port.cpp index de67688c9..5ee7679eb 100644 --- a/src/core/hle/kernel/client_port.cpp +++ b/src/core/hle/kernel/client_port.cpp @@ -7,7 +7,6 @@ #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/server_port.h" #include "core/hle/kernel/server_session.h" -#include "core/hle/service/service.h" namespace Kernel { diff --git a/src/core/hle/kernel/client_port.h b/src/core/hle/kernel/client_port.h index 7a53c93b8..4848cb4c4 100644 --- a/src/core/hle/kernel/client_port.h +++ b/src/core/hle/kernel/client_port.h @@ -5,14 +5,9 @@ #pragma once #include <string> -#include <memory> #include "common/common_types.h" #include "core/hle/kernel/kernel.h" -namespace Service { -class Interface; -} - namespace Kernel { class ServerPort; @@ -21,6 +16,17 @@ class ServerSession; class ClientPort final : public Object { public: friend class ServerPort; + std::string GetTypeName() const override { + return "ClientPort"; + } + std::string GetName() const override { + return name; + } + + static const HandleType HANDLE_TYPE = HandleType::ClientPort; + HandleType GetHandleType() const override { + return HANDLE_TYPE; + } /** * Adds the specified server session to the queue of pending sessions of the associated ServerPort @@ -28,18 +34,10 @@ public: */ void AddWaitingSession(SharedPtr<ServerSession> server_session); - std::string GetTypeName() const override { return "ClientPort"; } - std::string GetName() const override { return name; } - - static const HandleType HANDLE_TYPE = HandleType::ClientPort; - HandleType GetHandleType() const override { - return HANDLE_TYPE; - } - - SharedPtr<ServerPort> server_port; ///< ServerPort associated with this client port. - u32 max_sessions; ///< Maximum number of simultaneous sessions the port can have - u32 active_sessions; ///< Number of currently open sessions to this port - std::string name; ///< Name of client port (optional) + SharedPtr<ServerPort> server_port; ///< ServerPort associated with this client port. + u32 max_sessions; ///< Maximum number of simultaneous sessions the port can have + u32 active_sessions; ///< Number of currently open sessions to this port + std::string name; ///< Name of client port (optional) private: ClientPort(); ~ClientPort() override; diff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cpp index 31ea8045a..c8be29b0a 100644 --- a/src/core/hle/kernel/client_session.cpp +++ b/src/core/hle/kernel/client_session.cpp @@ -4,11 +4,8 @@ #include "common/assert.h" -#include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_session.h" #include "core/hle/kernel/server_session.h" -#include "core/hle/kernel/kernel.h" -#include "core/hle/service/service.h" namespace Kernel { diff --git a/src/core/hle/kernel/client_session.h b/src/core/hle/kernel/client_session.h index a951ea4d6..e34528301 100644 --- a/src/core/hle/kernel/client_session.h +++ b/src/core/hle/kernel/client_session.h @@ -11,13 +11,8 @@ #include "core/hle/kernel/kernel.h" -namespace Service { -class Interface; -} - namespace Kernel { -class ClientPort; class ServerSession; class ClientSession final : public Object { @@ -30,11 +25,17 @@ public: */ static ResultVal<SharedPtr<ClientSession>> Create(SharedPtr<ServerSession> server_session, std::string name = "Unknown"); - std::string GetTypeName() const override { return "ClientSession"; } - std::string GetName() const override { return name; } + std::string GetTypeName() const override { + return "ClientSession"; + } + std::string GetName() const override { + return name; + } static const HandleType HANDLE_TYPE = HandleType::ClientSession; - HandleType GetHandleType() const override { return HANDLE_TYPE; } + HandleType GetHandleType() const override { + return HANDLE_TYPE; + } /** * Handle a SyncRequest from the emulated application. diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 4bd505b5d..9808d375b 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -31,24 +31,22 @@ enum KernelHandle : Handle { }; enum class HandleType : u32 { - Unknown = 0, - - - Event = 3, - Mutex = 4, - SharedMemory = 5, - Redirection = 6, - Thread = 7, - Process = 8, - AddressArbiter = 9, - Semaphore = 10, - Timer = 11, - ResourceLimit = 12, - CodeSet = 13, - ClientPort = 14, - ServerPort = 15, - ClientSession = 16, - ServerSession = 17, + Unknown, + Event, + Mutex, + SharedMemory, + Redirection, + Thread, + Process, + AddressArbiter, + Semaphore, + Timer, + ResourceLimit, + CodeSet, + ClientPort, + ServerPort, + ClientSession, + ServerSession, }; enum { diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 200a7b815..006d67e65 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -4,7 +4,6 @@ #include <tuple> -#include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_session.h" #include "core/hle/kernel/server_session.h" #include "core/hle/kernel/thread.h" diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h index 86fe641c0..70661e9af 100644 --- a/src/core/hle/kernel/server_session.h +++ b/src/core/hle/kernel/server_session.h @@ -16,7 +16,6 @@ namespace Kernel { class ClientSession; -class ClientPort; /** * Kernel object representing the server endpoint of an IPC session. Sessions are the basic CTR-OS @@ -44,10 +43,14 @@ public: */ static ResultVal<SharedPtr<ServerSession>> Create(std::string name = "Unknown", std::shared_ptr<Service::SessionRequestHandler> hle_handler = nullptr); - std::string GetTypeName() const override { return "ServerSession"; } + std::string GetTypeName() const override { + return "ServerSession"; + } static const HandleType HANDLE_TYPE = HandleType::ServerSession; - HandleType GetHandleType() const override { return HANDLE_TYPE; } + HandleType GetHandleType() const override { + return HANDLE_TYPE; + } /** * Creates a pair of ServerSession and an associated ClientSession. |