Kernel: pass ref to port

This commit is contained in:
Weiyi Wang
2018-10-12 19:00:16 -04:00
parent c141657d83
commit 1213a298df
12 changed files with 37 additions and 25 deletions

View File

@@ -45,6 +45,8 @@ class ServiceManager {
public:
static void InstallInterfaces(Core::System& system);
explicit ServiceManager(Core::System& system);
ResultVal<Kernel::SharedPtr<Kernel::ServerPort>> RegisterService(std::string name,
unsigned int max_sessions);
ResultVal<Kernel::SharedPtr<Kernel::ClientPort>> GetServicePort(const std::string& name);
@@ -67,6 +69,7 @@ public:
}
private:
Core::System& system;
std::weak_ptr<SRV> srv_interface;
/// Map of registered services, retrieved using GetServicePort or ConnectToService.