diff options
| author | bunnei <bunneidev@gmail.com> | 2021-07-23 21:23:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-23 21:23:56 -0400 |
| commit | 2656020608e32f1f0120dead047b61302bcb4461 (patch) | |
| tree | 0f4b89d1e51ceb1232eec020d0fe22c7d8b7f930 /src/core/hle/kernel/kernel.h | |
| parent | db46f8a70c853ccab3318abed1416231a3c426db (diff) | |
| parent | 346bfb6c47096239e1997e348c76aeadbe05294d (diff) | |
Merge pull request #6551 from bunnei/improve-kernel-obj
Improve management of kernel objects
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
| -rw-r--r-- | src/core/hle/kernel/kernel.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 2d01e1ae0..3a6db0b1c 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,22 @@ 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); + + /// Unregisters a kernel object previously registered with RegisterKernelObject when it was + /// destroyed during the current emulation session. + void UnregisterKernelObject(KAutoObject* object); + /// Determines whether or not the given port is a valid named port. bool IsValidNamedPort(NamedPortTable::const_iterator port) const; |
