summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2020-01-30 18:19:21 -0500
committerGravatar Lioncash2020-01-30 18:29:57 -0500
commit51927bc9dc191165403203a146bd21fecd704691 (patch)
tree457c292a237e704bf08c218e3757cc2a00d19c4c /src
parentMerge pull request #3353 from FernandoS27/aries (diff)
downloadyuzu-51927bc9dc191165403203a146bd21fecd704691.tar.gz
yuzu-51927bc9dc191165403203a146bd21fecd704691.tar.xz
yuzu-51927bc9dc191165403203a146bd21fecd704691.zip
kernel/physical_core: Remove unused kernel reference member variable
This isn't used within the class, so it can be removed to simplify the overall interface. While we're in the same area, we can simplify a unique_ptr reset() call.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/kernel.cpp8
-rw-r--r--src/core/hle/kernel/physical_core.cpp5
-rw-r--r--src/core/hle/kernel/physical_core.h5
3 files changed, 7 insertions, 11 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 0cf3c8f70..edd4c4259 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -101,7 +101,7 @@ struct KernelCore::Impl {
101 void Initialize(KernelCore& kernel) { 101 void Initialize(KernelCore& kernel) {
102 Shutdown(); 102 Shutdown();
103 103
104 InitializePhysicalCores(kernel); 104 InitializePhysicalCores();
105 InitializeSystemResourceLimit(kernel); 105 InitializeSystemResourceLimit(kernel);
106 InitializeThreads(); 106 InitializeThreads();
107 InitializePreemption(); 107 InitializePreemption();
@@ -131,14 +131,14 @@ struct KernelCore::Impl {
131 } 131 }
132 cores.clear(); 132 cores.clear();
133 133
134 exclusive_monitor.reset(nullptr); 134 exclusive_monitor.reset();
135 } 135 }
136 136
137 void InitializePhysicalCores(KernelCore& kernel) { 137 void InitializePhysicalCores() {
138 exclusive_monitor = 138 exclusive_monitor =
139 Core::MakeExclusiveMonitor(system.Memory(), global_scheduler.CpuCoresCount()); 139 Core::MakeExclusiveMonitor(system.Memory(), global_scheduler.CpuCoresCount());
140 for (std::size_t i = 0; i < global_scheduler.CpuCoresCount(); i++) { 140 for (std::size_t i = 0; i < global_scheduler.CpuCoresCount(); i++) {
141 cores.emplace_back(system, kernel, i, *exclusive_monitor); 141 cores.emplace_back(system, i, *exclusive_monitor);
142 } 142 }
143 } 143 }
144 144
diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cpp
index 896a1a87a..e96d063fd 100644
--- a/src/core/hle/kernel/physical_core.cpp
+++ b/src/core/hle/kernel/physical_core.cpp
@@ -10,16 +10,15 @@
10#include "core/arm/exclusive_monitor.h" 10#include "core/arm/exclusive_monitor.h"
11#include "core/arm/unicorn/arm_unicorn.h" 11#include "core/arm/unicorn/arm_unicorn.h"
12#include "core/core.h" 12#include "core/core.h"
13#include "core/hle/kernel/kernel.h"
14#include "core/hle/kernel/physical_core.h" 13#include "core/hle/kernel/physical_core.h"
15#include "core/hle/kernel/scheduler.h" 14#include "core/hle/kernel/scheduler.h"
16#include "core/hle/kernel/thread.h" 15#include "core/hle/kernel/thread.h"
17 16
18namespace Kernel { 17namespace Kernel {
19 18
20PhysicalCore::PhysicalCore(Core::System& system, KernelCore& kernel, std::size_t id, 19PhysicalCore::PhysicalCore(Core::System& system, std::size_t id,
21 Core::ExclusiveMonitor& exclusive_monitor) 20 Core::ExclusiveMonitor& exclusive_monitor)
22 : core_index{id}, kernel{kernel} { 21 : core_index{id} {
23#ifdef ARCHITECTURE_x86_64 22#ifdef ARCHITECTURE_x86_64
24 arm_interface = std::make_shared<Core::ARM_Dynarmic>(system, exclusive_monitor, core_index); 23 arm_interface = std::make_shared<Core::ARM_Dynarmic>(system, exclusive_monitor, core_index);
25#else 24#else
diff --git a/src/core/hle/kernel/physical_core.h b/src/core/hle/kernel/physical_core.h
index fbef0801f..7dca97d1b 100644
--- a/src/core/hle/kernel/physical_core.h
+++ b/src/core/hle/kernel/physical_core.h
@@ -21,9 +21,7 @@ namespace Kernel {
21 21
22class PhysicalCore { 22class PhysicalCore {
23public: 23public:
24 PhysicalCore(Core::System& system, KernelCore& kernel, std::size_t id, 24 PhysicalCore(Core::System& system, std::size_t id, Core::ExclusiveMonitor& exclusive_monitor);
25 Core::ExclusiveMonitor& exclusive_monitor);
26
27 ~PhysicalCore(); 25 ~PhysicalCore();
28 26
29 /// Execute current jit state 27 /// Execute current jit state
@@ -66,7 +64,6 @@ public:
66 64
67private: 65private:
68 std::size_t core_index; 66 std::size_t core_index;
69 KernelCore& kernel;
70 std::shared_ptr<Core::ARM_Interface> arm_interface; 67 std::shared_ptr<Core::ARM_Interface> arm_interface;
71 std::shared_ptr<Kernel::Scheduler> scheduler; 68 std::shared_ptr<Kernel::Scheduler> scheduler;
72}; 69};