summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar David2019-10-28 10:53:27 +1100
committerGravatar GitHub2019-10-28 10:53:27 +1100
commit4c5731c34f0915457a31c60c9f70a2f169ea575d (patch)
tree7f03a7f892370b59e56ae06c6c74514f1cc44998 /src/core/core.cpp
parentMerge pull request #3034 from ReinUsesLisp/w4244-maxwell3d (diff)
parentKernel Thread: Cleanup THREADPROCESSORID_DONT_UPDATE. (diff)
downloadyuzu-4c5731c34f0915457a31c60c9f70a2f169ea575d.tar.gz
yuzu-4c5731c34f0915457a31c60c9f70a2f169ea575d.tar.xz
yuzu-4c5731c34f0915457a31c60c9f70a2f169ea575d.zip
Merge pull request #2971 from FernandoS27/new-scheduler-v2
Kernel: Implement a New Thread Scheduler V2
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index b7b9259ec..eba17218a 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -409,6 +409,12 @@ void System::PrepareReschedule() {
409 CurrentCpuCore().PrepareReschedule(); 409 CurrentCpuCore().PrepareReschedule();
410} 410}
411 411
412void System::PrepareReschedule(const u32 core_index) {
413 if (core_index < GlobalScheduler().CpuCoresCount()) {
414 CpuCore(core_index).PrepareReschedule();
415 }
416}
417
412PerfStatsResults System::GetAndResetPerfStats() { 418PerfStatsResults System::GetAndResetPerfStats() {
413 return impl->GetAndResetPerfStats(); 419 return impl->GetAndResetPerfStats();
414} 420}
@@ -449,6 +455,16 @@ const Kernel::Scheduler& System::Scheduler(std::size_t core_index) const {
449 return CpuCore(core_index).Scheduler(); 455 return CpuCore(core_index).Scheduler();
450} 456}
451 457
458/// Gets the global scheduler
459Kernel::GlobalScheduler& System::GlobalScheduler() {
460 return impl->kernel.GlobalScheduler();
461}
462
463/// Gets the global scheduler
464const Kernel::GlobalScheduler& System::GlobalScheduler() const {
465 return impl->kernel.GlobalScheduler();
466}
467
452Kernel::Process* System::CurrentProcess() { 468Kernel::Process* System::CurrentProcess() {
453 return impl->kernel.CurrentProcess(); 469 return impl->kernel.CurrentProcess();
454} 470}