mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 17:17:56 -05:00
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.
This commit is contained in:
@ -15,6 +15,10 @@ namespace Kernel {
|
||||
class Scheduler;
|
||||
}
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Core::Timing {
|
||||
class CoreTiming;
|
||||
}
|
||||
@ -45,8 +49,8 @@ private:
|
||||
|
||||
class Cpu {
|
||||
public:
|
||||
Cpu(Timing::CoreTiming& core_timing, ExclusiveMonitor& exclusive_monitor,
|
||||
CpuBarrier& cpu_barrier, std::size_t core_index);
|
||||
Cpu(System& system, ExclusiveMonitor& exclusive_monitor, CpuBarrier& cpu_barrier,
|
||||
std::size_t core_index);
|
||||
~Cpu();
|
||||
|
||||
void RunLoop(bool tight_loop = true);
|
||||
|
Reference in New Issue
Block a user