aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/global_scheduler_context.cpp
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-28 11:29:20 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-28 11:29:20 -0400
commit3b1639daa3650faf1b56906524b75f019f707f00 (patch)
tree6c95deff575a0de9be2768dc5002fcb1117c792b /src/core/hle/kernel/global_scheduler_context.cpp
parent12cca280bf750eb7674fd055428f1f7c65deed42 (diff)
core: emulate six CPU cores
Switch 2 applications are given cores 0..5 (title 4's npdm) and start a job worker per core. With four emulated cores, 4 and 5 were folded onto 0 and 1, so two cores ran two workers each. Switch 1 titles keep using cores 0..3; core 3 stays the shared system core.
Diffstat (limited to 'src/core/hle/kernel/global_scheduler_context.cpp')
-rw-r--r--src/core/hle/kernel/global_scheduler_context.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/global_scheduler_context.cpp b/src/core/hle/kernel/global_scheduler_context.cpp
index 6d1cd030e0..98d14c8549 100644
--- a/src/core/hle/kernel/global_scheduler_context.cpp
+++ b/src/core/hle/kernel/global_scheduler_context.cpp
@@ -40,12 +40,15 @@ void GlobalSchedulerContext::RemoveThread(KThread* thread) noexcept {
/// @note This operation happens every 10ms.
void GlobalSchedulerContext::PreemptThreads(KernelCore& kernel) noexcept {
// The priority levels at which the global scheduler preempts threads every 10 ms. They are
- // ordered from Core 0 to Core 3.
+ // ordered from Core 0 to Core 5; core 3 is shared with the system, 4 and 5 are application
+ // cores like 0..2.
static constexpr std::array<u32, Core::Hardware::NUM_CPU_CORES> per_core{
59,
59,
59,
63,
+ 59,
+ 59,
};
ASSERT(KScheduler::IsSchedulerLockedByCurrentThread(kernel));
for (u32 core_id = 0; core_id < per_core.size(); core_id++)