diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-10-29 16:24:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-29 16:24:52 +0100 |
commit | 6aee148b170e6886e58a3996f729b2cc87329e95 (patch) | |
tree | 39efd9469af6a922ee5f38d906940412333c1455 /src/core/hle/kernel/svc/svc_thread.cpp | |
parent | Merge pull request #11827 from liamwhite/preallocated (diff) | |
parent | kernel: make sure new process is in list (diff) | |
download | yuzu-6aee148b170e6886e58a3996f729b2cc87329e95.tar yuzu-6aee148b170e6886e58a3996f729b2cc87329e95.tar.gz yuzu-6aee148b170e6886e58a3996f729b2cc87329e95.tar.bz2 yuzu-6aee148b170e6886e58a3996f729b2cc87329e95.tar.lz yuzu-6aee148b170e6886e58a3996f729b2cc87329e95.tar.xz yuzu-6aee148b170e6886e58a3996f729b2cc87329e95.tar.zst yuzu-6aee148b170e6886e58a3996f729b2cc87329e95.zip |
Diffstat (limited to 'src/core/hle/kernel/svc/svc_thread.cpp')
-rw-r--r-- | src/core/hle/kernel/svc/svc_thread.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc/svc_thread.cpp b/src/core/hle/kernel/svc/svc_thread.cpp index 933b82e30..755fd62b5 100644 --- a/src/core/hle/kernel/svc/svc_thread.cpp +++ b/src/core/hle/kernel/svc/svc_thread.cpp @@ -85,10 +85,6 @@ Result StartThread(Core::System& system, Handle thread_handle) { // Try to start the thread. R_TRY(thread->Run()); - // If we succeeded, persist a reference to the thread. - thread->Open(); - system.Kernel().RegisterInUseObject(thread.GetPointerUnsafe()); - R_SUCCEED(); } @@ -99,7 +95,6 @@ void ExitThread(Core::System& system) { auto* const current_thread = GetCurrentThreadPointer(system.Kernel()); system.GlobalSchedulerContext().RemoveThread(current_thread); current_thread->Exit(); - system.Kernel().UnregisterInUseObject(current_thread); } /// Sleep the current thread @@ -260,7 +255,7 @@ Result GetThreadList(Core::System& system, s32* out_num_threads, u64 out_thread_ auto list_iter = thread_list.cbegin(); for (std::size_t i = 0; i < copy_amount; ++i, ++list_iter) { - memory.Write64(out_thread_ids, (*list_iter)->GetThreadId()); + memory.Write64(out_thread_ids, list_iter->GetThreadId()); out_thread_ids += sizeof(u64); } |