hle_ipc: Eliminate core memory globals

We can just pass the required instances into the constructor of the
request, eliminating all usages of the global system accessor.
This commit is contained in:
Lioncash
2020-05-03 12:41:30 -04:00
parent 3cfa7a89e0
commit 0ec07e8763
3 changed files with 16 additions and 10 deletions

View File

@ -137,8 +137,8 @@ ResultCode ServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& con
ResultCode ServerSession::QueueSyncRequest(std::shared_ptr<Thread> thread,
Core::Memory::Memory& memory) {
u32* cmd_buf{reinterpret_cast<u32*>(memory.GetPointer(thread->GetTLSAddress()))};
std::shared_ptr<Kernel::HLERequestContext> context{
std::make_shared<Kernel::HLERequestContext>(SharedFrom(this), std::move(thread))};
auto context =
std::make_shared<HLERequestContext>(kernel, memory, SharedFrom(this), std::move(thread));
context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf);
request_queue.Push(std::move(context));