summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-02-14 09:30:53 -0400
committerGravatar FernandoS272020-02-22 11:18:06 -0400
commit179bafa7cb1efae5405d38ea9b98dc6b3e1ec756 (patch)
treee26bc705bf9446b335c29e086b84c61916f44f32 /src/core/hle/kernel/kernel.h
parentKernel: Make global scheduler depend on KernelCore (diff)
downloadyuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.gz
yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.tar.xz
yuzu-179bafa7cb1efae5405d38ea9b98dc6b3e1ec756.zip
Kernel: Rename ThreadCallbackHandleTable and Setup Thread Ids on Kernel.
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
-rw-r--r--src/core/hle/kernel/kernel.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 0dfc559e9..c5e05f7b6 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -8,6 +8,7 @@
8#include <string> 8#include <string>
9#include <unordered_map> 9#include <unordered_map>
10#include <vector> 10#include <vector>
11#include "core/hardware_properties.h"
11#include "core/hle/kernel/object.h" 12#include "core/hle/kernel/object.h"
12 13
13namespace Core { 14namespace Core {
@@ -65,7 +66,7 @@ public:
65 std::shared_ptr<ResourceLimit> GetSystemResourceLimit() const; 66 std::shared_ptr<ResourceLimit> GetSystemResourceLimit() const;
66 67
67 /// Retrieves a shared pointer to a Thread instance within the thread wakeup handle table. 68 /// Retrieves a shared pointer to a Thread instance within the thread wakeup handle table.
68 std::shared_ptr<Thread> RetrieveThreadFromWakeupCallbackHandleTable(Handle handle) const; 69 std::shared_ptr<Thread> RetrieveThreadFromGlobalHandleTable(Handle handle) const;
69 70
70 /// Adds the given shared pointer to an internal list of active processes. 71 /// Adds the given shared pointer to an internal list of active processes.
71 void AppendNewProcess(std::shared_ptr<Process> process); 72 void AppendNewProcess(std::shared_ptr<Process> process);
@@ -127,6 +128,18 @@ public:
127 /// Determines whether or not the given port is a valid named port. 128 /// Determines whether or not the given port is a valid named port.
128 bool IsValidNamedPort(NamedPortTable::const_iterator port) const; 129 bool IsValidNamedPort(NamedPortTable::const_iterator port) const;
129 130
131 /// Gets the current host_thread/guest_thread handle.
132 Core::EmuThreadHandle GetCurrentEmuThreadId() const;
133
134 /// Gets the current host_thread handle.
135 u32 GetCurrentHostThreadId() const;
136
137 /// Register the current thread as a CPU Core Thread.
138 void RegisterCoreThread(std::size_t core_id);
139
140 /// Register the current thread as a non CPU core thread.
141 void RegisterHostThread();
142
130private: 143private:
131 friend class Object; 144 friend class Object;
132 friend class Process; 145 friend class Process;
@@ -147,11 +160,11 @@ private:
147 /// Retrieves the event type used for thread wakeup callbacks. 160 /// Retrieves the event type used for thread wakeup callbacks.
148 const std::shared_ptr<Core::Timing::EventType>& ThreadWakeupCallbackEventType() const; 161 const std::shared_ptr<Core::Timing::EventType>& ThreadWakeupCallbackEventType() const;
149 162
150 /// Provides a reference to the thread wakeup callback handle table. 163 /// Provides a reference to the global handle table.
151 Kernel::HandleTable& ThreadWakeupCallbackHandleTable(); 164 Kernel::HandleTable& GlobalHandleTable();
152 165
153 /// Provides a const reference to the thread wakeup callback handle table. 166 /// Provides a const reference to the global handle table.
154 const Kernel::HandleTable& ThreadWakeupCallbackHandleTable() const; 167 const Kernel::HandleTable& GlobalHandleTable() const;
155 168
156 struct Impl; 169 struct Impl;
157 std::unique_ptr<Impl> impl; 170 std::unique_ptr<Impl> impl;