summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.h
diff options
context:
space:
mode:
authorGravatar bunnei2021-04-03 19:11:46 -0700
committerGravatar bunnei2021-05-05 16:40:50 -0700
commitda7e9553dea4b1eaefb71aca8642ccce7c7f50fb (patch)
tree3da10a60005ddcc4237900eb5e7473fe7b006152 /src/core/hle/kernel/kernel.h
parenthle: kernel: svc: Migrate GetThreadPriority, StartThread, and ExitThread. (diff)
downloadyuzu-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.h11
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
17namespace Core { 18namespace Core {
18class CPUInterruptHandler; 19class CPUInterruptHandler;
@@ -30,6 +31,7 @@ namespace Kernel {
30class ClientPort; 31class ClientPort;
31class GlobalSchedulerContext; 32class GlobalSchedulerContext;
32class HandleTable; 33class HandleTable;
34class KAutoObjectWithListContainer;
33class KMemoryManager; 35class KMemoryManager;
34class KResourceLimit; 36class KResourceLimit;
35class KScheduler; 37class 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
246private: 255private:
247 friend class Object; 256 friend class Object;
248 friend class Process; 257 friend class Process;