aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc/svc_thread.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-29 11:24:52 -0400
committerGitHub <noreply@github.com>2023-10-29 11:24:52 -0400
commit6aee148b170e6886e58a3996f729b2cc87329e95 (patch)
tree39efd9469af6a922ee5f38d906940412333c1455 /src/core/hle/kernel/svc/svc_thread.cpp
parentb5b93e6741f28f1b276e1ad2899beff9af87afff (diff)
parent19e9bde9e069f841387b8d7cbb4b9074d5f30c21 (diff)
Merge pull request #11843 from liamwhite/sync-process
kernel: update KProcess
Diffstat (limited to 'src/core/hle/kernel/svc/svc_thread.cpp')
-rw-r--r--src/core/hle/kernel/svc/svc_thread.cpp7
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);
}