mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
core_cpu: Make arm_interface instances a std::unique_ptr
This is only exposed by reference, so we can just make it a unique pointer to get rid of the need to also use reference counting for the pointer.
This commit is contained in:
parent
a58eefa7e4
commit
598e4d2f6c
@ -55,13 +55,13 @@ Cpu::Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor,
|
|||||||
|
|
||||||
if (Settings::values.use_cpu_jit) {
|
if (Settings::values.use_cpu_jit) {
|
||||||
#ifdef ARCHITECTURE_x86_64
|
#ifdef ARCHITECTURE_x86_64
|
||||||
arm_interface = std::make_shared<ARM_Dynarmic>(exclusive_monitor, core_index);
|
arm_interface = std::make_unique<ARM_Dynarmic>(exclusive_monitor, core_index);
|
||||||
#else
|
#else
|
||||||
arm_interface = std::make_shared<ARM_Unicorn>();
|
arm_interface = std::make_unique<ARM_Unicorn>();
|
||||||
LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available");
|
LOG_WARNING(Core, "CPU JIT requested, but Dynarmic not available");
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
arm_interface = std::make_shared<ARM_Unicorn>();
|
arm_interface = std::make_unique<ARM_Unicorn>();
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduler = std::make_shared<Kernel::Scheduler>(*arm_interface);
|
scheduler = std::make_shared<Kernel::Scheduler>(*arm_interface);
|
||||||
|
@ -76,7 +76,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void Reschedule();
|
void Reschedule();
|
||||||
|
|
||||||
std::shared_ptr<ARM_Interface> arm_interface;
|
std::unique_ptr<ARM_Interface> arm_interface;
|
||||||
std::shared_ptr<CpuBarrier> cpu_barrier;
|
std::shared_ptr<CpuBarrier> cpu_barrier;
|
||||||
std::shared_ptr<Kernel::Scheduler> scheduler;
|
std::shared_ptr<Kernel::Scheduler> scheduler;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user