diff options
| author | 2018-10-15 08:42:06 -0400 | |
|---|---|---|
| committer | 2018-10-15 09:11:47 -0400 | |
| commit | c34efbbd60a41afbbab2ff17bbff999519cfb4b6 (patch) | |
| tree | bc6fa89e02a4c8d43b3cee93c124e3bc74b476b5 /src/core/core_cpu.h | |
| parent | Merge pull request #1486 from lioncash/file (diff) | |
| download | yuzu-c34efbbd60a41afbbab2ff17bbff999519cfb4b6.tar.gz yuzu-c34efbbd60a41afbbab2ff17bbff999519cfb4b6.tar.xz yuzu-c34efbbd60a41afbbab2ff17bbff999519cfb4b6.zip | |
core: Make CPUBarrier a unique_ptr instead of a shared_ptr
This will always outlive the Cpu instances, since it's destroyed after
we destroy the Cpu instances on shutdown, so there's no need for shared
ownership semantics here.
Diffstat (limited to 'src/core/core_cpu.h')
| -rw-r--r-- | src/core/core_cpu.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/core_cpu.h b/src/core/core_cpu.h index ee7e04abc..68d83ac8f 100644 --- a/src/core/core_cpu.h +++ b/src/core/core_cpu.h | |||
| @@ -41,8 +41,8 @@ private: | |||
| 41 | 41 | ||
| 42 | class Cpu { | 42 | class Cpu { |
| 43 | public: | 43 | public: |
| 44 | Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, | 44 | Cpu(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, CpuBarrier& cpu_barrier, |
| 45 | std::shared_ptr<CpuBarrier> cpu_barrier, std::size_t core_index); | 45 | std::size_t core_index); |
| 46 | ~Cpu(); | 46 | ~Cpu(); |
| 47 | 47 | ||
| 48 | void RunLoop(bool tight_loop = true); | 48 | void RunLoop(bool tight_loop = true); |
| @@ -77,7 +77,7 @@ private: | |||
| 77 | void Reschedule(); | 77 | void Reschedule(); |
| 78 | 78 | ||
| 79 | std::unique_ptr<ARM_Interface> arm_interface; | 79 | std::unique_ptr<ARM_Interface> arm_interface; |
| 80 | std::shared_ptr<CpuBarrier> cpu_barrier; | 80 | CpuBarrier& cpu_barrier; |
| 81 | std::shared_ptr<Kernel::Scheduler> scheduler; | 81 | std::shared_ptr<Kernel::Scheduler> scheduler; |
| 82 | 82 | ||
| 83 | std::atomic<bool> reschedule_pending = false; | 83 | std::atomic<bool> reschedule_pending = false; |