summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Subv2016-06-17 15:24:38 -0500
committerGravatar Subv2016-11-30 23:02:06 -0500
commit0a33d915f88b89e2fae20edc1e33a8ef60a2519c (patch)
treeb0eb3db13d9a21160ceb2fbb8d9e23ab1229659a /src/core
parent Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inte... (diff)
downloadyuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.tar.gz
yuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.tar.xz
yuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.zip
fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/kernel.h5
-rw-r--r--src/core/hle/kernel/server_session.cpp2
-rw-r--r--src/core/hle/kernel/server_session.h2
-rw-r--r--src/core/hle/service/service.h2
4 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index c11c14b7d..4bd505b5d 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -84,13 +84,13 @@ public:
84 */ 84 */
85 bool IsWaitable() const { 85 bool IsWaitable() const {
86 switch (GetHandleType()) { 86 switch (GetHandleType()) {
87 case HandleType::ServerSession:
88 case HandleType::ServerPort:
89 case HandleType::Event: 87 case HandleType::Event:
90 case HandleType::Mutex: 88 case HandleType::Mutex:
91 case HandleType::Thread: 89 case HandleType::Thread:
92 case HandleType::Semaphore: 90 case HandleType::Semaphore:
93 case HandleType::Timer: 91 case HandleType::Timer:
92 case HandleType::ServerPort:
93 case HandleType::ServerSession:
94 return true; 94 return true;
95 95
96 case HandleType::Unknown: 96 case HandleType::Unknown:
@@ -101,6 +101,7 @@ public:
101 case HandleType::ResourceLimit: 101 case HandleType::ResourceLimit:
102 case HandleType::CodeSet: 102 case HandleType::CodeSet:
103 case HandleType::ClientPort: 103 case HandleType::ClientPort:
104 case HandleType::ClientSession:
104 return false; 105 return false;
105 } 106 }
106 } 107 }
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp
index 9f5350ce5..720c0eb94 100644
--- a/src/core/hle/kernel/server_session.cpp
+++ b/src/core/hle/kernel/server_session.cpp
@@ -48,7 +48,7 @@ SharedPtr<ClientSession> ServerSession::CreateClientSession() {
48 return ClientSession::Create(SharedPtr<ServerSession>(this), nullptr, name + "Client").MoveFrom(); 48 return ClientSession::Create(SharedPtr<ServerSession>(this), nullptr, name + "Client").MoveFrom();
49} 49}
50 50
51std::tuple<SharedPtr<ServerSession>, SharedPtr<ClientSession>> ServerSession::CreateSessionPair(SharedPtr<ClientPort> client_port, std::string name) { 51std::tuple<SharedPtr<ServerSession>, SharedPtr<ClientSession>> ServerSession::CreateSessionPair(SharedPtr<ClientPort> client_port, const std::string& name) {
52 auto server_session = ServerSession::Create(name + "Server").MoveFrom(); 52 auto server_session = ServerSession::Create(name + "Server").MoveFrom();
53 auto client_session = ClientSession::Create(server_session, client_port, name + "Client").MoveFrom(); 53 auto client_session = ClientSession::Create(server_session, client_port, name + "Client").MoveFrom();
54 54
diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h
index eab9fe211..510b0a150 100644
--- a/src/core/hle/kernel/server_session.h
+++ b/src/core/hle/kernel/server_session.h
@@ -200,7 +200,7 @@ public:
200 * @param name Optional name of the ports 200 * @param name Optional name of the ports
201 * @return The created session tuple 201 * @return The created session tuple
202 */ 202 */
203 static std::tuple<SharedPtr<ServerSession>, SharedPtr<ClientSession>> CreateSessionPair(SharedPtr<ClientPort> client_port, std::string name = "Unknown"); 203 static std::tuple<SharedPtr<ServerSession>, SharedPtr<ClientSession>> CreateSessionPair(SharedPtr<ClientPort> client_port, const std::string& name = "Unknown");
204 204
205 /** 205 /**
206 * Creates a portless ClientSession and associates it with this ServerSession. 206 * Creates a portless ClientSession and associates it with this ServerSession.
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index fd15ad03f..8df968b2e 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -40,7 +40,7 @@ public:
40 * It should be overwritten by each service implementation for more fine-grained control. 40 * It should be overwritten by each service implementation for more fine-grained control.
41 * @returns The maximum number of connections allowed. 41 * @returns The maximum number of connections allowed.
42 */ 42 */
43 virtual u32 GetMaxSessions() { return DefaultMaxSessions; } 43 virtual u32 GetMaxSessions() const { return DefaultMaxSessions; }
44 44
45 void AddWaitingSession(Kernel::SharedPtr<Kernel::ServerSession> server_session) override { } 45 void AddWaitingSession(Kernel::SharedPtr<Kernel::ServerSession> server_session) override { }
46 46