summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-21 03:10:07 +0100
committerbunnei <bunneidev@gmail.com>2021-01-29 06:42:26 +0100
commit0a1449e04b99b2fe49b047f50174a60c2abb568c (patch)
tree8fc18904c5b4349bad23152ae0f7424ceb63ca5a /src/core/hle
parentcore: cpu_manager: Remove unused variable. (diff)
downloadyuzu-0a1449e04b99b2fe49b047f50174a60c2abb568c.tar
yuzu-0a1449e04b99b2fe49b047f50174a60c2abb568c.tar.gz
yuzu-0a1449e04b99b2fe49b047f50174a60c2abb568c.tar.bz2
yuzu-0a1449e04b99b2fe49b047f50174a60c2abb568c.tar.lz
yuzu-0a1449e04b99b2fe49b047f50174a60c2abb568c.tar.xz
yuzu-0a1449e04b99b2fe49b047f50174a60c2abb568c.tar.zst
yuzu-0a1449e04b99b2fe49b047f50174a60c2abb568c.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/k_thread.cpp9
-rw-r--r--src/core/hle/kernel/kernel.cpp4
2 files changed, 9 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index f021b0550..62ce2fbd5 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -1015,8 +1015,13 @@ ResultVal<std::shared_ptr<KThread>> KThread::Create(Core::System& system, Thread
std::shared_ptr<KThread> thread = std::make_shared<KThread>(kernel);
- thread->InitializeThread(thread.get(), entry_point, arg, stack_top, priority, processor_id,
- owner_process, type_flags);
+ if (const auto result =
+ thread->InitializeThread(thread.get(), entry_point, arg, stack_top, priority,
+ processor_id, owner_process, type_flags);
+ result.IsError()) {
+ return result;
+ }
+
thread->name = name;
auto& scheduler = kernel.GlobalSchedulerContext();
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index d61659453..6142496b6 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -117,14 +117,14 @@ struct KernelCore::Impl {
void InitializePhysicalCores() {
exclusive_monitor =
Core::MakeExclusiveMonitor(system.Memory(), Core::Hardware::NUM_CPU_CORES);
- for (s32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
+ for (u32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
schedulers[i] = std::make_unique<Kernel::KScheduler>(system, i);
cores.emplace_back(i, system, *schedulers[i], interrupts);
}
}
void InitializeSchedulers() {
- for (s32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
+ for (u32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
cores[i].Scheduler().Initialize();
}
}