summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 9d3b309b3..63ad07950 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -40,7 +40,7 @@ static void ThreadWakeupCallback(u64 thread_handle, [[maybe_unused]] s64 cycles_
40 // Lock the global kernel mutex when we enter the kernel HLE. 40 // Lock the global kernel mutex when we enter the kernel HLE.
41 std::lock_guard lock{HLE::g_hle_lock}; 41 std::lock_guard lock{HLE::g_hle_lock};
42 42
43 SharedPtr<Thread> thread = 43 std::shared_ptr<Thread> thread =
44 system.Kernel().RetrieveThreadFromWakeupCallbackHandleTable(proper_handle); 44 system.Kernel().RetrieveThreadFromWakeupCallbackHandleTable(proper_handle);
45 if (thread == nullptr) { 45 if (thread == nullptr) {
46 LOG_CRITICAL(Kernel, "Callback fired for invalid thread {:08X}", proper_handle); 46 LOG_CRITICAL(Kernel, "Callback fired for invalid thread {:08X}", proper_handle);
@@ -53,7 +53,7 @@ static void ThreadWakeupCallback(u64 thread_handle, [[maybe_unused]] s64 cycles_
53 thread->GetStatus() == ThreadStatus::WaitHLEEvent) { 53 thread->GetStatus() == ThreadStatus::WaitHLEEvent) {
54 // Remove the thread from each of its waiting objects' waitlists 54 // Remove the thread from each of its waiting objects' waitlists
55 for (const auto& object : thread->GetWaitObjects()) { 55 for (const auto& object : thread->GetWaitObjects()) {
56 object->RemoveWaitingThread(thread.get()); 56 object->RemoveWaitingThread(thread);
57 } 57 }
58 thread->ClearWaitObjects(); 58 thread->ClearWaitObjects();
59 59
@@ -160,11 +160,11 @@ struct KernelCore::Impl {
160 std::atomic<u64> next_thread_id{1}; 160 std::atomic<u64> next_thread_id{1};
161 161
162 // Lists all processes that exist in the current session. 162 // Lists all processes that exist in the current session.
163 std::vector<SharedPtr<Process>> process_list; 163 std::vector<std::shared_ptr<Process>> process_list;
164 Process* current_process = nullptr; 164 Process* current_process = nullptr;
165 Kernel::GlobalScheduler global_scheduler; 165 Kernel::GlobalScheduler global_scheduler;
166 166
167 SharedPtr<ResourceLimit> system_resource_limit; 167 std::shared_ptr<ResourceLimit> system_resource_limit;
168 168
169 Core::Timing::EventType* thread_wakeup_event_type = nullptr; 169 Core::Timing::EventType* thread_wakeup_event_type = nullptr;
170 Core::Timing::EventType* preemption_event = nullptr; 170 Core::Timing::EventType* preemption_event = nullptr;
@@ -193,15 +193,16 @@ void KernelCore::Shutdown() {
193 impl->Shutdown(); 193 impl->Shutdown();
194} 194}
195 195
196SharedPtr<ResourceLimit> KernelCore::GetSystemResourceLimit() const { 196std::shared_ptr<ResourceLimit> KernelCore::GetSystemResourceLimit() const {
197 return impl->system_resource_limit; 197 return impl->system_resource_limit;
198} 198}
199 199
200SharedPtr<Thread> KernelCore::RetrieveThreadFromWakeupCallbackHandleTable(Handle handle) const { 200std::shared_ptr<Thread> KernelCore::RetrieveThreadFromWakeupCallbackHandleTable(
201 Handle handle) const {
201 return impl->thread_wakeup_callback_handle_table.Get<Thread>(handle); 202 return impl->thread_wakeup_callback_handle_table.Get<Thread>(handle);
202} 203}
203 204
204void KernelCore::AppendNewProcess(SharedPtr<Process> process) { 205void KernelCore::AppendNewProcess(std::shared_ptr<Process> process) {
205 impl->process_list.push_back(std::move(process)); 206 impl->process_list.push_back(std::move(process));
206} 207}
207 208
@@ -223,7 +224,7 @@ const Process* KernelCore::CurrentProcess() const {
223 return impl->current_process; 224 return impl->current_process;
224} 225}
225 226
226const std::vector<SharedPtr<Process>>& KernelCore::GetProcessList() const { 227const std::vector<std::shared_ptr<Process>>& KernelCore::GetProcessList() const {
227 return impl->process_list; 228 return impl->process_list;
228} 229}
229 230
@@ -235,7 +236,7 @@ const Kernel::GlobalScheduler& KernelCore::GlobalScheduler() const {
235 return impl->global_scheduler; 236 return impl->global_scheduler;
236} 237}
237 238
238void KernelCore::AddNamedPort(std::string name, SharedPtr<ClientPort> port) { 239void KernelCore::AddNamedPort(std::string name, std::shared_ptr<ClientPort> port) {
239 impl->named_ports.emplace(std::move(name), std::move(port)); 240 impl->named_ports.emplace(std::move(name), std::move(port));
240} 241}
241 242