diff options
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 713ee17c1..50f0a42fb 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -140,7 +140,7 @@ struct System::Impl { | |||
| 140 | 140 | ||
| 141 | cpu_barrier = std::make_shared<CpuBarrier>(); | 141 | cpu_barrier = std::make_shared<CpuBarrier>(); |
| 142 | cpu_exclusive_monitor = Cpu::MakeExclusiveMonitor(cpu_cores.size()); | 142 | cpu_exclusive_monitor = Cpu::MakeExclusiveMonitor(cpu_cores.size()); |
| 143 | for (size_t index = 0; index < cpu_cores.size(); ++index) { | 143 | for (std::size_t index = 0; index < cpu_cores.size(); ++index) { |
| 144 | cpu_cores[index] = std::make_shared<Cpu>(cpu_exclusive_monitor, cpu_barrier, index); | 144 | cpu_cores[index] = std::make_shared<Cpu>(cpu_exclusive_monitor, cpu_barrier, index); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| @@ -161,7 +161,7 @@ struct System::Impl { | |||
| 161 | // CPU core 0 is run on the main thread | 161 | // CPU core 0 is run on the main thread |
| 162 | thread_to_cpu[std::this_thread::get_id()] = cpu_cores[0]; | 162 | thread_to_cpu[std::this_thread::get_id()] = cpu_cores[0]; |
| 163 | if (Settings::values.use_multi_core) { | 163 | if (Settings::values.use_multi_core) { |
| 164 | for (size_t index = 0; index < cpu_core_threads.size(); ++index) { | 164 | for (std::size_t index = 0; index < cpu_core_threads.size(); ++index) { |
| 165 | cpu_core_threads[index] = | 165 | cpu_core_threads[index] = |
| 166 | std::make_unique<std::thread>(RunCpuCore, cpu_cores[index + 1]); | 166 | std::make_unique<std::thread>(RunCpuCore, cpu_cores[index + 1]); |
| 167 | thread_to_cpu[cpu_core_threads[index]->get_id()] = cpu_cores[index + 1]; | 167 | thread_to_cpu[cpu_core_threads[index]->get_id()] = cpu_cores[index + 1]; |
| @@ -285,7 +285,7 @@ struct System::Impl { | |||
| 285 | std::shared_ptr<CpuBarrier> cpu_barrier; | 285 | std::shared_ptr<CpuBarrier> cpu_barrier; |
| 286 | std::array<std::shared_ptr<Cpu>, NUM_CPU_CORES> cpu_cores; | 286 | std::array<std::shared_ptr<Cpu>, NUM_CPU_CORES> cpu_cores; |
| 287 | std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads; | 287 | std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads; |
| 288 | size_t active_core{}; ///< Active core, only used in single thread mode | 288 | std::size_t active_core{}; ///< Active core, only used in single thread mode |
| 289 | 289 | ||
| 290 | /// Service manager | 290 | /// Service manager |
| 291 | std::shared_ptr<Service::SM::ServiceManager> service_manager; | 291 | std::shared_ptr<Service::SM::ServiceManager> service_manager; |
| @@ -348,7 +348,7 @@ ARM_Interface& System::CurrentArmInterface() { | |||
| 348 | return CurrentCpuCore().ArmInterface(); | 348 | return CurrentCpuCore().ArmInterface(); |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | size_t System::CurrentCoreIndex() { | 351 | std::size_t System::CurrentCoreIndex() { |
| 352 | return CurrentCpuCore().CoreIndex(); | 352 | return CurrentCpuCore().CoreIndex(); |
| 353 | } | 353 | } |
| 354 | 354 | ||
| @@ -356,7 +356,7 @@ Kernel::Scheduler& System::CurrentScheduler() { | |||
| 356 | return *CurrentCpuCore().Scheduler(); | 356 | return *CurrentCpuCore().Scheduler(); |
| 357 | } | 357 | } |
| 358 | 358 | ||
| 359 | const std::shared_ptr<Kernel::Scheduler>& System::Scheduler(size_t core_index) { | 359 | const std::shared_ptr<Kernel::Scheduler>& System::Scheduler(std::size_t core_index) { |
| 360 | ASSERT(core_index < NUM_CPU_CORES); | 360 | ASSERT(core_index < NUM_CPU_CORES); |
| 361 | return impl->cpu_cores[core_index]->Scheduler(); | 361 | return impl->cpu_cores[core_index]->Scheduler(); |
| 362 | } | 362 | } |
| @@ -369,12 +369,12 @@ const Kernel::SharedPtr<Kernel::Process>& System::CurrentProcess() const { | |||
| 369 | return impl->kernel.CurrentProcess(); | 369 | return impl->kernel.CurrentProcess(); |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | ARM_Interface& System::ArmInterface(size_t core_index) { | 372 | ARM_Interface& System::ArmInterface(std::size_t core_index) { |
| 373 | ASSERT(core_index < NUM_CPU_CORES); | 373 | ASSERT(core_index < NUM_CPU_CORES); |
| 374 | return impl->cpu_cores[core_index]->ArmInterface(); | 374 | return impl->cpu_cores[core_index]->ArmInterface(); |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | Cpu& System::CpuCore(size_t core_index) { | 377 | Cpu& System::CpuCore(std::size_t core_index) { |
| 378 | ASSERT(core_index < NUM_CPU_CORES); | 378 | ASSERT(core_index < NUM_CPU_CORES); |
| 379 | return *impl->cpu_cores[core_index]; | 379 | return *impl->cpu_cores[core_index]; |
| 380 | } | 380 | } |