diff options
| author | 2018-10-15 08:53:01 -0400 | |
|---|---|---|
| committer | 2018-10-15 14:15:50 -0400 | |
| commit | aeadbfa790b11ba859605df8a9357b960084b2a0 (patch) | |
| tree | eb46f94603e38f81ccf443024357ad567d5ef15b /src/core/core_cpu.h | |
| parent | core: Make CPUBarrier a unique_ptr instead of a shared_ptr (diff) | |
| download | yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.tar.gz yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.tar.xz yuzu-aeadbfa790b11ba859605df8a9357b960084b2a0.zip | |
core: Make the exclusive monitor a unique_ptr instead of a shared_ptr
Like the barrier, this is owned entirely by the System and will always
outlive the encompassing state, so shared ownership semantics aren't
necessary here.
Diffstat (limited to 'src/core/core_cpu.h')
| -rw-r--r-- | src/core/core_cpu.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h index 68d83ac8f..3d62de7cb 100644 --- a/src/core/core_cpu.h +++ b/src/core/core_cpu.h | |||
| @@ -41,8 +41,7 @@ private: | |||
| 41 | 41 | ||
| 42 | class Cpu { | 42 | class Cpu { |
| 43 | public: | 43 | public: |
| 44 | Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, CpuBarrier& cpu_barrier, | 44 | Cpu(ExclusiveMonitor& exclusive_monitor, CpuBarrier& cpu_barrier, std::size_t core_index); |
| 45 | std::size_t core_index); | ||
| 46 | ~Cpu(); | 45 | ~Cpu(); |
| 47 | 46 | ||
| 48 | void RunLoop(bool tight_loop = true); | 47 | void RunLoop(bool tight_loop = true); |
| @@ -71,7 +70,7 @@ public: | |||
| 71 | return core_index; | 70 | return core_index; |
| 72 | } | 71 | } |
| 73 | 72 | ||
| 74 | static std::shared_ptr<ExclusiveMonitor> MakeExclusiveMonitor(std::size_t num_cores); | 73 | static std::unique_ptr<ExclusiveMonitor> MakeExclusiveMonitor(std::size_t num_cores); |
| 75 | 74 | ||
| 76 | private: | 75 | private: |
| 77 | void Reschedule(); | 76 | void Reschedule(); |