diff options
author | bunnei <bunneidev@gmail.com> | 2021-11-27 00:10:21 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-12-07 01:39:18 +0100 |
commit | 0d9afdedc4ef9c0861739b04fc9a53926305e1f3 (patch) | |
tree | 58438353898e08ea00ce5cfb3e5a4abcf0f2fb6c /src/core/hle/kernel | |
parent | hle: kernel: fix timing on thread preemption (diff) | |
download | yuzu-0d9afdedc4ef9c0861739b04fc9a53926305e1f3.tar yuzu-0d9afdedc4ef9c0861739b04fc9a53926305e1f3.tar.gz yuzu-0d9afdedc4ef9c0861739b04fc9a53926305e1f3.tar.bz2 yuzu-0d9afdedc4ef9c0861739b04fc9a53926305e1f3.tar.lz yuzu-0d9afdedc4ef9c0861739b04fc9a53926305e1f3.tar.xz yuzu-0d9afdedc4ef9c0861739b04fc9a53926305e1f3.tar.zst yuzu-0d9afdedc4ef9c0861739b04fc9a53926305e1f3.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/k_thread.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index f69978caf..334487d8a 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -113,6 +113,8 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s [[fallthrough]]; case ThreadType::HighPriority: [[fallthrough]]; + case ThreadType::Dummy: + [[fallthrough]]; case ThreadType::User: ASSERT(((owner == nullptr) || (owner->GetCoreMask() | (1ULL << virt_core)) == owner->GetCoreMask())); @@ -248,7 +250,7 @@ ResultCode KThread::InitializeThread(KThread* thread, KThreadFunction func, uint } ResultCode KThread::InitializeDummyThread(KThread* thread) { - return thread->Initialize({}, {}, {}, DefaultThreadPriority, 3, {}, ThreadType::Main); + return thread->Initialize({}, {}, {}, DefaultThreadPriority, 3, {}, ThreadType::Dummy); } ResultCode KThread::InitializeIdleThread(Core::System& system, KThread* thread, s32 virt_core) { diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index be1bc59ae..94b87bef1 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -48,6 +48,7 @@ enum class ThreadType : u32 { Kernel = 1, HighPriority = 2, User = 3, + Dummy = 100, // Special thread type for emulation purposes only }; DECLARE_ENUM_FLAG_OPERATORS(ThreadType); |