diff options
| -rw-r--r-- | src/core/cpu_manager.h | 6 | ||||
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/src/core/cpu_manager.h b/src/core/cpu_manager.h index 33fb43cfa..17420c941 100644 --- a/src/core/cpu_manager.h +++ b/src/core/cpu_manager.h | |||
| @@ -49,9 +49,9 @@ public: | |||
| 49 | 49 | ||
| 50 | void Pause(bool paused); | 50 | void Pause(bool paused); |
| 51 | 51 | ||
| 52 | std::function<void(void*)> GetGuestThreadStartFunc(); | 52 | static std::function<void(void*)> GetGuestThreadStartFunc(); |
| 53 | std::function<void(void*)> GetIdleThreadStartFunc(); | 53 | static std::function<void(void*)> GetIdleThreadStartFunc(); |
| 54 | std::function<void(void*)> GetSuspendThreadStartFunc(); | 54 | static std::function<void(void*)> GetSuspendThreadStartFunc(); |
| 55 | void* GetStartFuncParamater(); | 55 | void* GetStartFuncParamater(); |
| 56 | 56 | ||
| 57 | void PreemptSingleCore(bool from_running_enviroment = true); | 57 | void PreemptSingleCore(bool from_running_enviroment = true); |
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 6e2014e08..e1c7a0f3b 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -161,13 +161,14 @@ struct KernelCore::Impl { | |||
| 161 | void InitializeSuspendThreads() { | 161 | void InitializeSuspendThreads() { |
| 162 | for (std::size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { | 162 | for (std::size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { |
| 163 | std::string name = "Suspend Thread Id:" + std::to_string(i); | 163 | std::string name = "Suspend Thread Id:" + std::to_string(i); |
| 164 | std::function<void(void*)> init_func = | 164 | std::function<void(void*)> init_func = Core::CpuManager::GetSuspendThreadStartFunc(); |
| 165 | system.GetCpuManager().GetSuspendThreadStartFunc(); | ||
| 166 | void* init_func_parameter = system.GetCpuManager().GetStartFuncParamater(); | 165 | void* init_func_parameter = system.GetCpuManager().GetStartFuncParamater(); |
| 167 | ThreadType type = | 166 | const auto type = |
| 168 | static_cast<ThreadType>(THREADTYPE_KERNEL | THREADTYPE_HLE | THREADTYPE_SUSPEND); | 167 | static_cast<ThreadType>(THREADTYPE_KERNEL | THREADTYPE_HLE | THREADTYPE_SUSPEND); |
| 169 | auto thread_res = Thread::Create(system, type, name, 0, 0, 0, static_cast<u32>(i), 0, | 168 | auto thread_res = |
| 170 | nullptr, std::move(init_func), init_func_parameter); | 169 | Thread::Create(system, type, std::move(name), 0, 0, 0, static_cast<u32>(i), 0, |
| 170 | nullptr, std::move(init_func), init_func_parameter); | ||
| 171 | |||
| 171 | suspend_threads[i] = std::move(thread_res).Unwrap(); | 172 | suspend_threads[i] = std::move(thread_res).Unwrap(); |
| 172 | } | 173 | } |
| 173 | } | 174 | } |
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 7b929781c..f93e5e4b0 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp | |||
| @@ -802,7 +802,7 @@ void Scheduler::UpdateLastContextSwitchTime(Thread* thread, Process* process) { | |||
| 802 | 802 | ||
| 803 | void Scheduler::Initialize() { | 803 | void Scheduler::Initialize() { |
| 804 | std::string name = "Idle Thread Id:" + std::to_string(core_id); | 804 | std::string name = "Idle Thread Id:" + std::to_string(core_id); |
| 805 | std::function<void(void*)> init_func = system.GetCpuManager().GetIdleThreadStartFunc(); | 805 | std::function<void(void*)> init_func = Core::CpuManager::GetIdleThreadStartFunc(); |
| 806 | void* init_func_parameter = system.GetCpuManager().GetStartFuncParamater(); | 806 | void* init_func_parameter = system.GetCpuManager().GetStartFuncParamater(); |
| 807 | ThreadType type = static_cast<ThreadType>(THREADTYPE_KERNEL | THREADTYPE_HLE | THREADTYPE_IDLE); | 807 | ThreadType type = static_cast<ThreadType>(THREADTYPE_KERNEL | THREADTYPE_HLE | THREADTYPE_IDLE); |
| 808 | auto thread_res = Thread::Create(system, type, name, 0, 64, 0, static_cast<u32>(core_id), 0, | 808 | auto thread_res = Thread::Create(system, type, name, 0, 64, 0, static_cast<u32>(core_id), 0, |
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 67148fa6d..d132aba34 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -155,7 +155,7 @@ ResultVal<std::shared_ptr<Thread>> Thread::Create(Core::System& system, ThreadTy | |||
| 155 | std::string name, VAddr entry_point, u32 priority, | 155 | std::string name, VAddr entry_point, u32 priority, |
| 156 | u64 arg, s32 processor_id, VAddr stack_top, | 156 | u64 arg, s32 processor_id, VAddr stack_top, |
| 157 | Process* owner_process) { | 157 | Process* owner_process) { |
| 158 | std::function<void(void*)> init_func = system.GetCpuManager().GetGuestThreadStartFunc(); | 158 | std::function<void(void*)> init_func = Core::CpuManager::GetGuestThreadStartFunc(); |
| 159 | void* init_func_parameter = system.GetCpuManager().GetStartFuncParamater(); | 159 | void* init_func_parameter = system.GetCpuManager().GetStartFuncParamater(); |
| 160 | return Create(system, type_flags, name, entry_point, priority, arg, processor_id, stack_top, | 160 | return Create(system, type_flags, name, entry_point, priority, arg, processor_id, stack_top, |
| 161 | owner_process, std::move(init_func), init_func_parameter); | 161 | owner_process, std::move(init_func), init_func_parameter); |