diff options
| author | 2021-04-03 19:11:46 -0700 | |
|---|---|---|
| committer | 2021-05-05 16:40:50 -0700 | |
| commit | da7e9553dea4b1eaefb71aca8642ccce7c7f50fb (patch) | |
| tree | 3da10a60005ddcc4237900eb5e7473fe7b006152 /src/core/hle/kernel/kernel.h | |
| parent | hle: kernel: svc: Migrate GetThreadPriority, StartThread, and ExitThread. (diff) | |
| download | yuzu-da7e9553dea4b1eaefb71aca8642ccce7c7f50fb.tar.gz yuzu-da7e9553dea4b1eaefb71aca8642ccce7c7f50fb.tar.xz yuzu-da7e9553dea4b1eaefb71aca8642ccce7c7f50fb.zip | |
hle: kernel: Migrate more of KThread to KAutoObject.
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
| -rw-r--r-- | src/core/hle/kernel/kernel.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index a500e63bc..3f5c2aec7 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include "core/hardware_properties.h" | 13 | #include "core/hardware_properties.h" |
| 14 | #include "core/hle/kernel/memory_types.h" | 14 | #include "core/hle/kernel/memory_types.h" |
| 15 | #include "core/hle/kernel/object.h" | 15 | #include "core/hle/kernel/object.h" |
| 16 | #include "core/hle/kernel/k_auto_object.h" | ||
| 16 | 17 | ||
| 17 | namespace Core { | 18 | namespace Core { |
| 18 | class CPUInterruptHandler; | 19 | class CPUInterruptHandler; |
| @@ -30,6 +31,7 @@ namespace Kernel { | |||
| 30 | class ClientPort; | 31 | class ClientPort; |
| 31 | class GlobalSchedulerContext; | 32 | class GlobalSchedulerContext; |
| 32 | class HandleTable; | 33 | class HandleTable; |
| 34 | class KAutoObjectWithListContainer; | ||
| 33 | class KMemoryManager; | 35 | class KMemoryManager; |
| 34 | class KResourceLimit; | 36 | class KResourceLimit; |
| 35 | class KScheduler; | 37 | class KScheduler; |
| @@ -86,7 +88,7 @@ public: | |||
| 86 | std::shared_ptr<KResourceLimit> GetSystemResourceLimit() const; | 88 | std::shared_ptr<KResourceLimit> GetSystemResourceLimit() const; |
| 87 | 89 | ||
| 88 | /// Retrieves a shared pointer to a Thread instance within the thread wakeup handle table. | 90 | /// Retrieves a shared pointer to a Thread instance within the thread wakeup handle table. |
| 89 | std::shared_ptr<KThread> RetrieveThreadFromGlobalHandleTable(Handle handle) const; | 91 | KScopedAutoObject<KThread> RetrieveThreadFromGlobalHandleTable(Handle handle) const; |
| 90 | 92 | ||
| 91 | /// Adds the given shared pointer to an internal list of active processes. | 93 | /// Adds the given shared pointer to an internal list of active processes. |
| 92 | void AppendNewProcess(std::shared_ptr<Process> process); | 94 | void AppendNewProcess(std::shared_ptr<Process> process); |
| @@ -143,6 +145,10 @@ public: | |||
| 143 | 145 | ||
| 144 | const Core::ExclusiveMonitor& GetExclusiveMonitor() const; | 146 | const Core::ExclusiveMonitor& GetExclusiveMonitor() const; |
| 145 | 147 | ||
| 148 | KAutoObjectWithListContainer& ObjectListContainer(); | ||
| 149 | |||
| 150 | const KAutoObjectWithListContainer& ObjectListContainer() const; | ||
| 151 | |||
| 146 | std::array<Core::CPUInterruptHandler, Core::Hardware::NUM_CPU_CORES>& Interrupts(); | 152 | std::array<Core::CPUInterruptHandler, Core::Hardware::NUM_CPU_CORES>& Interrupts(); |
| 147 | 153 | ||
| 148 | const std::array<Core::CPUInterruptHandler, Core::Hardware::NUM_CPU_CORES>& Interrupts() const; | 154 | const std::array<Core::CPUInterruptHandler, Core::Hardware::NUM_CPU_CORES>& Interrupts() const; |
| @@ -243,6 +249,9 @@ public: | |||
| 243 | bool IsPhantomModeForSingleCore() const; | 249 | bool IsPhantomModeForSingleCore() const; |
| 244 | void SetIsPhantomModeForSingleCore(bool value); | 250 | void SetIsPhantomModeForSingleCore(bool value); |
| 245 | 251 | ||
| 252 | Core::System& System(); | ||
| 253 | const Core::System& System() const; | ||
| 254 | |||
| 246 | private: | 255 | private: |
| 247 | friend class Object; | 256 | friend class Object; |
| 248 | friend class Process; | 257 | friend class Process; |