summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-15 14:53:01 +0200
committerLioncash <mathew1800@gmail.com>2018-10-15 20:15:50 +0200
commitaeadbfa790b11ba859605df8a9357b960084b2a0 (patch)
treeeb46f94603e38f81ccf443024357ad567d5ef15b /src/core/core.cpp
parentcore: Make CPUBarrier a unique_ptr instead of a shared_ptr (diff)
downloadyuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.tar
yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.tar.gz
yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.tar.bz2
yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.tar.lz
yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.tar.xz
yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.tar.zst
yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.zip
Diffstat (limited to '')
-rw-r--r--src/core/core.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 1b9b1f608..876469ee3 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -142,7 +142,7 @@ struct System::Impl {
cpu_barrier = std::make_unique<CpuBarrier>();
cpu_exclusive_monitor = Cpu::MakeExclusiveMonitor(cpu_cores.size());
for (std::size_t index = 0; index < cpu_cores.size(); ++index) {
- cpu_cores[index] = std::make_shared<Cpu>(cpu_exclusive_monitor, *cpu_barrier, index);
+ cpu_cores[index] = std::make_shared<Cpu>(*cpu_exclusive_monitor, *cpu_barrier, index);
}
telemetry_session = std::make_unique<Core::TelemetrySession>();
@@ -245,6 +245,7 @@ struct System::Impl {
for (auto& cpu_core : cpu_cores) {
cpu_core.reset();
}
+ cpu_exclusive_monitor.reset();
cpu_barrier.reset();
// Shutdown kernel and core timing
@@ -282,7 +283,7 @@ struct System::Impl {
std::unique_ptr<VideoCore::RendererBase> renderer;
std::unique_ptr<Tegra::GPU> gpu_core;
std::shared_ptr<Tegra::DebugContext> debug_context;
- std::shared_ptr<ExclusiveMonitor> cpu_exclusive_monitor;
+ std::unique_ptr<ExclusiveMonitor> cpu_exclusive_monitor;
std::unique_ptr<CpuBarrier> cpu_barrier;
std::array<std::shared_ptr<Cpu>, NUM_CPU_CORES> cpu_cores;
std::array<std::unique_ptr<std::thread>, NUM_CPU_CORES - 1> cpu_core_threads;