summaryrefslogtreecommitdiffstats
path: root/src/core/core_cpu.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_cpu.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_cpu.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp
index 928262c9b..9f856ca6e 100644
--- a/src/core/core_cpu.cpp
+++ b/src/core/core_cpu.cpp
@@ -49,8 +49,7 @@ bool CpuBarrier::Rendezvous() {
return false;
}
-Cpu::Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, CpuBarrier& cpu_barrier,
- std::size_t core_index)
+Cpu::Cpu(ExclusiveMonitor& exclusive_monitor, CpuBarrier& cpu_barrier, std::size_t core_index)
: cpu_barrier{cpu_barrier}, core_index{core_index} {
if (Settings::values.use_cpu_jit) {
#ifdef ARCHITECTURE_x86_64
@@ -68,10 +67,10 @@ Cpu::Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, CpuBarrier& cpu_ba
Cpu::~Cpu() = default;
-std::shared_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_cores) {
+std::unique_ptr<ExclusiveMonitor> Cpu::MakeExclusiveMonitor(std::size_t num_cores) {
if (Settings::values.use_cpu_jit) {
#ifdef ARCHITECTURE_x86_64
- return std::make_shared<DynarmicExclusiveMonitor>(num_cores);
+ return std::make_unique<DynarmicExclusiveMonitor>(num_cores);
#else
return nullptr; // TODO(merry): Passthrough exclusive monitor
#endif