kernel: Make the address arbiter instance per-process
Now that we have the address arbiter extracted to its own class, we can fix an innaccuracy with the kernel. Said inaccuracy being that there isn't only one address arbiter. Each process instance contains its own AddressArbiter instance in the actual kernel. This fixes that and gets rid of another long-standing issue that could arise when attempting to create more than one process.
This commit is contained in:
parent
b7f331afa3
commit
8e510d5afa
8 changed files with 35 additions and 28 deletions
|
@ -87,7 +87,7 @@ static void ThreadWakeupCallback(u64 thread_handle, [[maybe_unused]] int cycles_
|
|||
}
|
||||
|
||||
struct KernelCore::Impl {
|
||||
explicit Impl(Core::System& system) : address_arbiter{system}, system{system} {}
|
||||
explicit Impl(Core::System& system) : system{system} {}
|
||||
|
||||
void Initialize(KernelCore& kernel) {
|
||||
Shutdown();
|
||||
|
@ -138,8 +138,6 @@ struct KernelCore::Impl {
|
|||
std::vector<SharedPtr<Process>> process_list;
|
||||
Process* current_process = nullptr;
|
||||
|
||||
Kernel::AddressArbiter address_arbiter;
|
||||
|
||||
SharedPtr<ResourceLimit> system_resource_limit;
|
||||
|
||||
Core::Timing::EventType* thread_wakeup_event_type = nullptr;
|
||||
|
@ -192,14 +190,6 @@ const Process* KernelCore::CurrentProcess() const {
|
|||
return impl->current_process;
|
||||
}
|
||||
|
||||
AddressArbiter& KernelCore::AddressArbiter() {
|
||||
return impl->address_arbiter;
|
||||
}
|
||||
|
||||
const AddressArbiter& KernelCore::AddressArbiter() const {
|
||||
return impl->address_arbiter;
|
||||
}
|
||||
|
||||
void KernelCore::AddNamedPort(std::string name, SharedPtr<ClientPort> port) {
|
||||
impl->named_ports.emplace(std::move(name), std::move(port));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue