diff options
| author | 2021-07-23 21:23:56 -0400 | |
|---|---|---|
| committer | 2021-07-23 21:23:56 -0400 | |
| commit | 2656020608e32f1f0120dead047b61302bcb4461 (patch) | |
| tree | 0f4b89d1e51ceb1232eec020d0fe22c7d8b7f930 /src/core/hle/kernel/kernel.h | |
| parent | Merge pull request #6686 from ReinUsesLisp/vk-optimal-copy (diff) | |
| parent | hle: service: kernel_helpers: Remove unnecessary pragma once. (diff) | |
| download | yuzu-2656020608e32f1f0120dead047b61302bcb4461.tar.gz yuzu-2656020608e32f1f0120dead047b61302bcb4461.tar.xz yuzu-2656020608e32f1f0120dead047b61302bcb4461.zip | |
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; | |||
| 45 | class KProcess; | 45 | class KProcess; |
| 46 | class KResourceLimit; | 46 | class KResourceLimit; |
| 47 | class KScheduler; | 47 | class KScheduler; |
| 48 | class KServerSession; | ||
| 48 | class KSession; | 49 | class KSession; |
| 49 | class KSharedMemory; | 50 | class KSharedMemory; |
| 50 | class KThread; | 51 | class KThread; |
| @@ -185,6 +186,22 @@ public: | |||
| 185 | /// Opens a port to a service previously registered with RegisterNamedService. | 186 | /// Opens a port to a service previously registered with RegisterNamedService. |
| 186 | KClientPort* CreateNamedServicePort(std::string name); | 187 | KClientPort* CreateNamedServicePort(std::string name); |
| 187 | 188 | ||
| 189 | /// Registers a server session with the gobal emulation state, to be freed on shutdown. This is | ||
| 190 | /// necessary because we do not emulate processes for HLE sessions. | ||
| 191 | void RegisterServerSession(KServerSession* server_session); | ||
| 192 | |||
| 193 | /// Unregisters a server session previously registered with RegisterServerSession when it was | ||
| 194 | /// destroyed during the current emulation session. | ||
| 195 | void UnregisterServerSession(KServerSession* server_session); | ||
| 196 | |||
| 197 | /// Registers all kernel objects with the global emulation state, this is purely for tracking | ||
| 198 | /// leaks after emulation has been shutdown. | ||
| 199 | void RegisterKernelObject(KAutoObject* object); | ||
| 200 | |||
| 201 | /// Unregisters a kernel object previously registered with RegisterKernelObject when it was | ||
| 202 | /// destroyed during the current emulation session. | ||
| 203 | void UnregisterKernelObject(KAutoObject* object); | ||
| 204 | |||
| 188 | /// Determines whether or not the given port is a valid named port. | 205 | /// Determines whether or not the given port is a valid named port. |
| 189 | bool IsValidNamedPort(NamedPortTable::const_iterator port) const; | 206 | bool IsValidNamedPort(NamedPortTable::const_iterator port) const; |
| 190 | 207 | ||