aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-07-16 13:28:10 -0400
committerLioncash <mathew1800@gmail.com>2020-07-16 13:30:56 -0400
commitf0125b2be8ba34aaf07b8c9d04b866d29ceea53a (patch)
treec9fd8ce00f4ff0fbec3c5767db1dad5d22327085 /src/core/hle/kernel/kernel.cpp
parent51546ce57eea6cfe22024bc20473b5e80768884a (diff)
cpu_manager: Mark function getters as static
All these do are return std::function instances of static functions, so these can be used without an instance of the CPU manager.
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 6e2014e08b..e1c7a0f3b7 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -161,13 +161,14 @@ struct KernelCore::Impl {
void InitializeSuspendThreads() {
for (std::size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
std::string name = "Suspend Thread Id:" + std::to_string(i);
- std::function<void(void*)> init_func =
- system.GetCpuManager().GetSuspendThreadStartFunc();
+ std::function<void(void*)> init_func = Core::CpuManager::GetSuspendThreadStartFunc();
void* init_func_parameter = system.GetCpuManager().GetStartFuncParamater();
- ThreadType type =
+ const auto type =
static_cast<ThreadType>(THREADTYPE_KERNEL | THREADTYPE_HLE | THREADTYPE_SUSPEND);
- auto thread_res = Thread::Create(system, type, name, 0, 0, 0, static_cast<u32>(i), 0,
- nullptr, std::move(init_func), init_func_parameter);
+ auto thread_res =
+ Thread::Create(system, type, std::move(name), 0, 0, 0, static_cast<u32>(i), 0,
+ nullptr, std::move(init_func), init_func_parameter);
+
suspend_threads[i] = std::move(thread_res).Unwrap();
}
}