summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_thread.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-06-27 00:52:16 +0200
committerLiam <byteslice@airmail.cc>2022-07-15 04:47:18 +0200
commit0624c880bd5af45ae9095465e079fa55458515f6 (patch)
treea8b9f3adf516af30cad021fc32f8669426946cd5 /src/core/hle/kernel/k_thread.cpp
parentMerge pull request #8540 from lat9nq/copy-nv-ffmpeg (diff)
downloadyuzu-0624c880bd5af45ae9095465e079fa55458515f6.tar
yuzu-0624c880bd5af45ae9095465e079fa55458515f6.tar.gz
yuzu-0624c880bd5af45ae9095465e079fa55458515f6.tar.bz2
yuzu-0624c880bd5af45ae9095465e079fa55458515f6.tar.lz
yuzu-0624c880bd5af45ae9095465e079fa55458515f6.tar.xz
yuzu-0624c880bd5af45ae9095465e079fa55458515f6.tar.zst
yuzu-0624c880bd5af45ae9095465e079fa55458515f6.zip
Diffstat (limited to 'src/core/hle/kernel/k_thread.cpp')
-rw-r--r--src/core/hle/kernel/k_thread.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index 90de86770..9daa589b5 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -261,9 +261,14 @@ Result KThread::InitializeDummyThread(KThread* thread) {
return thread->Initialize({}, {}, {}, DummyThreadPriority, 3, {}, ThreadType::Dummy);
}
+Result KThread::InitializeMainThread(Core::System& system, KThread* thread, s32 virt_core) {
+ return InitializeThread(thread, {}, {}, {}, IdleThreadPriority, virt_core, {}, ThreadType::Main,
+ system.GetCpuManager().GetGuestActivateFunc());
+}
+
Result KThread::InitializeIdleThread(Core::System& system, KThread* thread, s32 virt_core) {
return InitializeThread(thread, {}, {}, {}, IdleThreadPriority, virt_core, {}, ThreadType::Main,
- system.GetCpuManager().GetIdleThreadStartFunc());
+ abort);
}
Result KThread::InitializeHighPriorityThread(Core::System& system, KThread* thread,
@@ -277,7 +282,7 @@ Result KThread::InitializeUserThread(Core::System& system, KThread* thread, KThr
KProcess* owner) {
system.Kernel().GlobalSchedulerContext().AddThread(thread);
return InitializeThread(thread, func, arg, user_stack_top, prio, virt_core, owner,
- ThreadType::User, system.GetCpuManager().GetGuestThreadStartFunc());
+ ThreadType::User, system.GetCpuManager().GetGuestThreadFunc());
}
void KThread::PostDestroy(uintptr_t arg) {
@@ -1058,6 +1063,8 @@ void KThread::Exit() {
// Register the thread as a work task.
KWorkerTaskManager::AddTask(kernel, KWorkerTaskManager::WorkerType::Exit, this);
}
+
+ UNREACHABLE_MSG("KThread::Exit() would return");
}
Result KThread::Sleep(s64 timeout) {