mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-18 11:30:59 +01:00
hle: kernel: k_thread: Treat dummy threads as a special type.
This commit is contained in:
parent
894ed14ebc
commit
0d9afdedc4
2 changed files with 4 additions and 1 deletions
|
@ -113,6 +113,8 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case ThreadType::HighPriority:
|
case ThreadType::HighPriority:
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
|
case ThreadType::Dummy:
|
||||||
|
[[fallthrough]];
|
||||||
case ThreadType::User:
|
case ThreadType::User:
|
||||||
ASSERT(((owner == nullptr) ||
|
ASSERT(((owner == nullptr) ||
|
||||||
(owner->GetCoreMask() | (1ULL << virt_core)) == owner->GetCoreMask()));
|
(owner->GetCoreMask() | (1ULL << virt_core)) == owner->GetCoreMask()));
|
||||||
|
@ -248,7 +250,7 @@ ResultCode KThread::InitializeThread(KThread* thread, KThreadFunction func, uint
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode KThread::InitializeDummyThread(KThread* thread) {
|
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) {
|
ResultCode KThread::InitializeIdleThread(Core::System& system, KThread* thread, s32 virt_core) {
|
||||||
|
|
|
@ -48,6 +48,7 @@ enum class ThreadType : u32 {
|
||||||
Kernel = 1,
|
Kernel = 1,
|
||||||
HighPriority = 2,
|
HighPriority = 2,
|
||||||
User = 3,
|
User = 3,
|
||||||
|
Dummy = 100, // Special thread type for emulation purposes only
|
||||||
};
|
};
|
||||||
DECLARE_ENUM_FLAG_OPERATORS(ThreadType);
|
DECLARE_ENUM_FLAG_OPERATORS(ThreadType);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue