mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-19 12:11:06 +00:00
fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
This commit is contained in:
parent
073653e858
commit
0a33d915f8
@ -84,13 +84,13 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool IsWaitable() const {
|
bool IsWaitable() const {
|
||||||
switch (GetHandleType()) {
|
switch (GetHandleType()) {
|
||||||
case HandleType::ServerSession:
|
|
||||||
case HandleType::ServerPort:
|
|
||||||
case HandleType::Event:
|
case HandleType::Event:
|
||||||
case HandleType::Mutex:
|
case HandleType::Mutex:
|
||||||
case HandleType::Thread:
|
case HandleType::Thread:
|
||||||
case HandleType::Semaphore:
|
case HandleType::Semaphore:
|
||||||
case HandleType::Timer:
|
case HandleType::Timer:
|
||||||
|
case HandleType::ServerPort:
|
||||||
|
case HandleType::ServerSession:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case HandleType::Unknown:
|
case HandleType::Unknown:
|
||||||
@ -101,6 +101,7 @@ public:
|
|||||||
case HandleType::ResourceLimit:
|
case HandleType::ResourceLimit:
|
||||||
case HandleType::CodeSet:
|
case HandleType::CodeSet:
|
||||||
case HandleType::ClientPort:
|
case HandleType::ClientPort:
|
||||||
|
case HandleType::ClientSession:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ SharedPtr<ClientSession> ServerSession::CreateClientSession() {
|
|||||||
return ClientSession::Create(SharedPtr<ServerSession>(this), nullptr, name + "Client").MoveFrom();
|
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 server_session = ServerSession::Create(name + "Server").MoveFrom();
|
||||||
auto client_session = ClientSession::Create(server_session, client_port, name + "Client").MoveFrom();
|
auto client_session = ClientSession::Create(server_session, client_port, name + "Client").MoveFrom();
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ public:
|
|||||||
* @param name Optional name of the ports
|
* @param name Optional name of the ports
|
||||||
* @return The created session tuple
|
* @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.
|
* Creates a portless ClientSession and associates it with this ServerSession.
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
* It should be overwritten by each service implementation for more fine-grained control.
|
* It should be overwritten by each service implementation for more fine-grained control.
|
||||||
* @returns The maximum number of connections allowed.
|
* @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 { }
|
void AddWaitingSession(Kernel::SharedPtr<Kernel::ServerSession> server_session) override { }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user