diff options
author | bunnei <bunneidev@gmail.com> | 2017-12-31 22:11:27 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2017-12-31 22:11:27 +0100 |
commit | 45debfe4fd11556d54793032fa22fbc10ecdfc50 (patch) | |
tree | 0d87ecb16febe7f3f31f8a2d572f56d89631c339 /src/core/hle/svc.cpp | |
parent | svc: Implement svcCreateThread. (diff) | |
download | yuzu-45debfe4fd11556d54793032fa22fbc10ecdfc50.tar yuzu-45debfe4fd11556d54793032fa22fbc10ecdfc50.tar.gz yuzu-45debfe4fd11556d54793032fa22fbc10ecdfc50.tar.bz2 yuzu-45debfe4fd11556d54793032fa22fbc10ecdfc50.tar.lz yuzu-45debfe4fd11556d54793032fa22fbc10ecdfc50.tar.xz yuzu-45debfe4fd11556d54793032fa22fbc10ecdfc50.tar.zst yuzu-45debfe4fd11556d54793032fa22fbc10ecdfc50.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/svc.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 3b2eb5d5e..bffa18c39 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -295,6 +295,14 @@ static ResultCode StartThread(Handle thread_handle) { return RESULT_SUCCESS; } +/// Called when a thread exits +static void ExitThread() { + LOG_TRACE(Kernel_SVC, "called, pc=0x%08X", Core::CPU().GetPC()); + + Kernel::ExitCurrentThread(); + Core::System::GetInstance().PrepareReschedule(); +} + /// Sleep the current thread static void SleepThread(s64 nanoseconds) { LOG_TRACE(Kernel_SVC, "called nanoseconds=%lld", nanoseconds); @@ -346,7 +354,7 @@ static const FunctionDef SVC_Table[] = { {0x07, nullptr, "svcExitProcess"}, {0x08, HLE::Wrap<CreateThread>, "svcCreateThread"}, {0x09, HLE::Wrap<StartThread>, "svcStartThread"}, - {0x0A, nullptr, "svcExitThread"}, + {0x0A, HLE::Wrap<ExitThread>, "svcExitThread"}, {0x0B, HLE::Wrap<SleepThread>, "svcSleepThread"}, {0x0C, HLE::Wrap<GetThreadPriority>, "svcGetThreadPriority"}, {0x0D, HLE::Wrap<SetThreadPriority>, "svcSetThreadPriority"}, |