HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread

This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads)
This commit is contained in:
Weiyi Wang 2019-04-02 12:30:03 -04:00
parent daeba65fb4
commit f565ea80f0
8 changed files with 16 additions and 22 deletions

View file

@ -25,7 +25,7 @@ TEST_CASE("HLERequestContext::PopulateFromIncomingCommandBuffer", "[core][kernel
Memory::MemorySystem memory;
Kernel::KernelSystem kernel(memory, timing, [] {}, 0);
auto session = std::get<std::shared_ptr<ServerSession>>(kernel.CreateSessionPair());
HLERequestContext context(kernel, std::move(session));
HLERequestContext context(kernel, std::move(session), nullptr);
auto process = kernel.CreateProcess(kernel.CreateCodeSet("", 0));
@ -237,7 +237,7 @@ TEST_CASE("HLERequestContext::WriteToOutgoingCommandBuffer", "[core][kernel]") {
Memory::MemorySystem memory;
Kernel::KernelSystem kernel(memory, timing, [] {}, 0);
auto session = std::get<std::shared_ptr<ServerSession>>(kernel.CreateSessionPair());
HLERequestContext context(kernel, std::move(session));
HLERequestContext context(kernel, std::move(session), nullptr);
auto process = kernel.CreateProcess(kernel.CreateCodeSet("", 0));
auto* input = context.CommandBuffer();