summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2016-06-17 22:24:38 +0200
committerSubv <subv2112@gmail.com>2016-12-01 05:02:06 +0100
commit0a33d915f88b89e2fae20edc1e33a8ef60a2519c (patch)
treeb0eb3db13d9a21160ceb2fbb8d9e23ab1229659a /src/core/hle
parent Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication. (diff)
downloadyuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.tar
yuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.tar.gz
yuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.tar.bz2
yuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.tar.lz
yuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.tar.xz
yuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.tar.zst
yuzu-0a33d915f88b89e2fae20edc1e33a8ef60a2519c.zip
Diffstat (limited to 'src/core/hle')
-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:
*/
bool IsWaitable() const {
switch (GetHandleType()) {
- case HandleType::ServerSession:
- case HandleType::ServerPort:
case HandleType::Event:
case HandleType::Mutex:
case HandleType::Thread:
case HandleType::Semaphore:
case HandleType::Timer:
+ case HandleType::ServerPort:
+ case HandleType::ServerSession:
return true;
case HandleType::Unknown:
@@ -101,6 +101,7 @@ public:
case HandleType::ResourceLimit:
case HandleType::CodeSet:
case HandleType::ClientPort:
+ case HandleType::ClientSession:
return false;
}
}
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() {
return ClientSession::Create(SharedPtr<ServerSession>(this), nullptr, name + "Client").MoveFrom();
}
-std::tuple<SharedPtr<ServerSession>, SharedPtr<ClientSession>> ServerSession::CreateSessionPair(SharedPtr<ClientPort> client_port, std::string name) {
+std::tuple<SharedPtr<ServerSession>, SharedPtr<ClientSession>> ServerSession::CreateSessionPair(SharedPtr<ClientPort> client_port, const std::string& name) {
auto server_session = ServerSession::Create(name + "Server").MoveFrom();
auto client_session = ClientSession::Create(server_session, client_port, name + "Client").MoveFrom();
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:
* @param name Optional name of the ports
* @return The created session tuple
*/
- static std::tuple<SharedPtr<ServerSession>, SharedPtr<ClientSession>> CreateSessionPair(SharedPtr<ClientPort> client_port, std::string name = "Unknown");
+ static std::tuple<SharedPtr<ServerSession>, SharedPtr<ClientSession>> CreateSessionPair(SharedPtr<ClientPort> client_port, const std::string& name = "Unknown");
/**
* 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:
* It should be overwritten by each service implementation for more fine-grained control.
* @returns The maximum number of connections allowed.
*/
- virtual u32 GetMaxSessions() { return DefaultMaxSessions; }
+ virtual u32 GetMaxSessions() const { return DefaultMaxSessions; }
void AddWaitingSession(Kernel::SharedPtr<Kernel::ServerSession> server_session) override { }