summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/svc.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 9db3d632a..120cf75f3 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -179,6 +179,21 @@ static ResultCode QueryMemory(MemoryInfo* memory_info, PageInfo* page_info, VAdd
179 return QueryProcessMemory(memory_info, page_info, Kernel::CurrentProcess, addr); 179 return QueryProcessMemory(memory_info, page_info, Kernel::CurrentProcess, addr);
180} 180}
181 181
182/// Starts the thread for the provided handle.
183static ResultCode StartThread(Handle thread_handle) {
184 LOG_TRACE(Kernel_SVC, "called thread=0x%08X", thread_handle);
185
186 const SharedPtr<Kernel::Thread> thread =
187 Kernel::g_handle_table.Get<Kernel::Thread>(thread_handle);
188 if (!thread) {
189 return ERR_INVALID_HANDLE;
190 }
191
192 thread->ResumeFromWait();
193
194 return RESULT_SUCCESS;
195}
196
182/// Sleep the current thread 197/// Sleep the current thread
183static void SleepThread(s64 nanoseconds) { 198static void SleepThread(s64 nanoseconds) {
184 LOG_TRACE(Kernel_SVC, "called nanoseconds=%lld", nanoseconds); 199 LOG_TRACE(Kernel_SVC, "called nanoseconds=%lld", nanoseconds);
@@ -230,6 +245,7 @@ static const FunctionDef SVC_Table[] = {
230 {0x07, nullptr, "svcExitProcess"}, 245 {0x07, nullptr, "svcExitProcess"},
231 {0x08, nullptr, "svcCreateThread"}, 246 {0x08, nullptr, "svcCreateThread"},
232 {0x09, nullptr, "svcStartThread"}, 247 {0x09, nullptr, "svcStartThread"},
248 {0x09, HLE::Wrap<StartThread>, "svcStartThread"},
233 {0x0A, nullptr, "svcExitThread"}, 249 {0x0A, nullptr, "svcExitThread"},
234 {0x0B, HLE::Wrap<SleepThread>, "svcSleepThread"}, 250 {0x0B, HLE::Wrap<SleepThread>, "svcSleepThread"},
235 {0x0C, HLE::Wrap<GetThreadPriority>, "svcGetThreadPriority"}, 251 {0x0C, HLE::Wrap<GetThreadPriority>, "svcGetThreadPriority"},