summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2020-12-02 18:08:35 -0800
committerGravatar bunnei2020-12-06 00:03:24 -0800
commit9e29e36a784496f7290c03b6a42e400a164a5b1e (patch)
treed33cc91b4651b374e0c244be7b7e3b47ef7680fd /src/core/core.cpp
parenthle: kernel: physical_core: Clear exclusive state after each run. (diff)
downloadyuzu-9e29e36a784496f7290c03b6a42e400a164a5b1e.tar.gz
yuzu-9e29e36a784496f7290c03b6a42e400a164a5b1e.tar.xz
yuzu-9e29e36a784496f7290c03b6a42e400a164a5b1e.zip
hle: kernel: Rewrite scheduler implementation based on Mesopshere.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 01e4faac8..77d21d41c 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -27,10 +27,10 @@
27#include "core/file_sys/vfs_real.h" 27#include "core/file_sys/vfs_real.h"
28#include "core/hardware_interrupt_manager.h" 28#include "core/hardware_interrupt_manager.h"
29#include "core/hle/kernel/client_port.h" 29#include "core/hle/kernel/client_port.h"
30#include "core/hle/kernel/k_scheduler.h"
30#include "core/hle/kernel/kernel.h" 31#include "core/hle/kernel/kernel.h"
31#include "core/hle/kernel/physical_core.h" 32#include "core/hle/kernel/physical_core.h"
32#include "core/hle/kernel/process.h" 33#include "core/hle/kernel/process.h"
33#include "core/hle/kernel/scheduler.h"
34#include "core/hle/kernel/thread.h" 34#include "core/hle/kernel/thread.h"
35#include "core/hle/service/am/applets/applets.h" 35#include "core/hle/service/am/applets/applets.h"
36#include "core/hle/service/apm/controller.h" 36#include "core/hle/service/apm/controller.h"
@@ -508,14 +508,6 @@ std::size_t System::CurrentCoreIndex() const {
508 return core; 508 return core;
509} 509}
510 510
511Kernel::Scheduler& System::CurrentScheduler() {
512 return impl->kernel.CurrentScheduler();
513}
514
515const Kernel::Scheduler& System::CurrentScheduler() const {
516 return impl->kernel.CurrentScheduler();
517}
518
519Kernel::PhysicalCore& System::CurrentPhysicalCore() { 511Kernel::PhysicalCore& System::CurrentPhysicalCore() {
520 return impl->kernel.CurrentPhysicalCore(); 512 return impl->kernel.CurrentPhysicalCore();
521} 513}
@@ -524,22 +516,14 @@ const Kernel::PhysicalCore& System::CurrentPhysicalCore() const {
524 return impl->kernel.CurrentPhysicalCore(); 516 return impl->kernel.CurrentPhysicalCore();
525} 517}
526 518
527Kernel::Scheduler& System::Scheduler(std::size_t core_index) {
528 return impl->kernel.Scheduler(core_index);
529}
530
531const Kernel::Scheduler& System::Scheduler(std::size_t core_index) const {
532 return impl->kernel.Scheduler(core_index);
533}
534
535/// Gets the global scheduler 519/// Gets the global scheduler
536Kernel::GlobalScheduler& System::GlobalScheduler() { 520Kernel::GlobalSchedulerContext& System::GlobalSchedulerContext() {
537 return impl->kernel.GlobalScheduler(); 521 return impl->kernel.GlobalSchedulerContext();
538} 522}
539 523
540/// Gets the global scheduler 524/// Gets the global scheduler
541const Kernel::GlobalScheduler& System::GlobalScheduler() const { 525const Kernel::GlobalSchedulerContext& System::GlobalSchedulerContext() const {
542 return impl->kernel.GlobalScheduler(); 526 return impl->kernel.GlobalSchedulerContext();
543} 527}
544 528
545Kernel::Process* System::CurrentProcess() { 529Kernel::Process* System::CurrentProcess() {