summaryrefslogtreecommitdiff
path: root/src/core/core_cpu.h
diff options
context:
space:
mode:
authorGravatar Lioncash2019-03-04 16:02:59 -0500
committerGravatar Lioncash2019-03-04 17:01:37 -0500
commitfad20213e6f377d75ced3c2554b4f00a46ff9263 (patch)
tree8911a6765d4549836fec1e5b06c64b5e94f4860d /src/core/core_cpu.h
parentMerge pull request #2165 from ReinUsesLisp/unbind-tex (diff)
downloadyuzu-fad20213e6f377d75ced3c2554b4f00a46ff9263.tar.gz
yuzu-fad20213e6f377d75ced3c2554b4f00a46ff9263.tar.xz
yuzu-fad20213e6f377d75ced3c2554b4f00a46ff9263.zip
kernel/scheduler: Pass in system instance in constructor
Avoids directly relying on the global system instance and instead makes an arbitrary system instance an explicit dependency on construction. This also allows removing dependencies on some global accessor functions as well.
Diffstat (limited to 'src/core/core_cpu.h')
-rw-r--r--src/core/core_cpu.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h
index e2204c6b0..7589beb8c 100644
--- a/src/core/core_cpu.h
+++ b/src/core/core_cpu.h
@@ -15,6 +15,10 @@ namespace Kernel {
15class Scheduler; 15class Scheduler;
16} 16}
17 17
18namespace Core {
19class System;
20}
21
18namespace Core::Timing { 22namespace Core::Timing {
19class CoreTiming; 23class CoreTiming;
20} 24}
@@ -45,8 +49,8 @@ private:
45 49
46class Cpu { 50class Cpu {
47public: 51public:
48 Cpu(Timing::CoreTiming& core_timing, ExclusiveMonitor& exclusive_monitor, 52 Cpu(System& system, ExclusiveMonitor& exclusive_monitor, CpuBarrier& cpu_barrier,
49 CpuBarrier& cpu_barrier, std::size_t core_index); 53 std::size_t core_index);
50 ~Cpu(); 54 ~Cpu();
51 55
52 void RunLoop(bool tight_loop = true); 56 void RunLoop(bool tight_loop = true);