aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-07-02 15:19:04 -0700
committerbunnei <bunneidev@gmail.com>2021-07-20 18:54:56 -0700
commit52caa52cc2e47d426b5af38fd8439da237836e0e (patch)
tree1412e9e92f8f3f1bd67d2d237234d149011a55d2 /src/core/hle/kernel/kernel.h
parent8d755147d8fbe664d78b3e78514b64804505d6d7 (diff)
hle: kernel: Track and release server sessions, and protect methods with locks.
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
-rw-r--r--src/core/hle/kernel/kernel.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index b669ca74e1..3a6db0b1ce 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -45,6 +45,7 @@ class KPort;
class KProcess;
class KResourceLimit;
class KScheduler;
+class KServerSession;
class KSession;
class KSharedMemory;
class KThread;
@@ -185,6 +186,14 @@ public:
/// Opens a port to a service previously registered with RegisterNamedService.
KClientPort* CreateNamedServicePort(std::string name);
+ /// Registers a server session with the gobal emulation state, to be freed on shutdown. This is
+ /// necessary because we do not emulate processes for HLE sessions.
+ void RegisterServerSession(KServerSession* server_session);
+
+ /// Unregisters a server session previously registered with RegisterServerSession when it was
+ /// destroyed during the current emulation session.
+ void UnregisterServerSession(KServerSession* server_session);
+
/// Registers all kernel objects with the global emulation state, this is purely for tracking
/// leaks after emulation has been shutdown.
void RegisterKernelObject(KAutoObject* object);