From 47af34003b97a27ee8456cedb367b41f8687b517 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 5 Mar 2021 00:13:29 -0800 Subject: hle: kernel: KThread: Rework dummy threads & fix memory leak. - Dummy threads are created on thread local storage for all host threads. - Fixes a leak by removing creation of fibers, which are not applicable here. --- src/core/hle/kernel/svc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/svc.cpp') diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index cc8fa6576..326d3b9ec 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1532,8 +1532,9 @@ static ResultCode CreateThread(Core::System& system, Handle* out_handle, VAddr e std::shared_ptr thread; { KScopedLightLock lk{process.GetStateLock()}; - CASCADE_RESULT(thread, KThread::Create(system, ThreadType::User, "", entry_point, priority, - arg, core_id, stack_bottom, &process)); + CASCADE_RESULT(thread, + KThread::CreateUserThread(system, ThreadType::User, "", entry_point, + priority, arg, core_id, stack_bottom, &process)); } const auto new_thread_handle = process.GetHandleTable().Create(thread); -- cgit v1.2.3