summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2019-03-05 11:54:06 -0500
committerGravatar Lioncash2019-03-05 12:58:26 -0500
commitec6664f6d61f46569a2686b864ba3e9a0f85fc60 (patch)
tree67a78607f085efd3e4258fd90afd2aa2036d0448 /src/core/hle/kernel/kernel.cpp
parentMerge pull request #2185 from FearlessTobi/port-4630 (diff)
downloadyuzu-ec6664f6d61f46569a2686b864ba3e9a0f85fc60.tar.gz
yuzu-ec6664f6d61f46569a2686b864ba3e9a0f85fc60.tar.xz
yuzu-ec6664f6d61f46569a2686b864ba3e9a0f85fc60.zip
kernel/address_arbiter: Convert the address arbiter into a class
Places all of the functions for address arbiter operation into a class. This will be necessary for future deglobalizing efforts related to both the memory and system itself.
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index dd749eed4..b771a33a6 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -12,6 +12,7 @@
12 12
13#include "core/core.h" 13#include "core/core.h"
14#include "core/core_timing.h" 14#include "core/core_timing.h"
15#include "core/hle/kernel/address_arbiter.h"
15#include "core/hle/kernel/client_port.h" 16#include "core/hle/kernel/client_port.h"
16#include "core/hle/kernel/handle_table.h" 17#include "core/hle/kernel/handle_table.h"
17#include "core/hle/kernel/kernel.h" 18#include "core/hle/kernel/kernel.h"
@@ -135,6 +136,8 @@ struct KernelCore::Impl {
135 std::vector<SharedPtr<Process>> process_list; 136 std::vector<SharedPtr<Process>> process_list;
136 Process* current_process = nullptr; 137 Process* current_process = nullptr;
137 138
139 Kernel::AddressArbiter address_arbiter;
140
138 SharedPtr<ResourceLimit> system_resource_limit; 141 SharedPtr<ResourceLimit> system_resource_limit;
139 142
140 Core::Timing::EventType* thread_wakeup_event_type = nullptr; 143 Core::Timing::EventType* thread_wakeup_event_type = nullptr;
@@ -184,6 +187,14 @@ const Process* KernelCore::CurrentProcess() const {
184 return impl->current_process; 187 return impl->current_process;
185} 188}
186 189
190AddressArbiter& KernelCore::AddressArbiter() {
191 return impl->address_arbiter;
192}
193
194const AddressArbiter& KernelCore::AddressArbiter() const {
195 return impl->address_arbiter;
196}
197
187void KernelCore::AddNamedPort(std::string name, SharedPtr<ClientPort> port) { 198void KernelCore::AddNamedPort(std::string name, SharedPtr<ClientPort> port) {
188 impl->named_ports.emplace(std::move(name), std::move(port)); 199 impl->named_ports.emplace(std::move(name), std::move(port));
189} 200}