From 8d6342384b3932e18e98c223debd192ae1b73216 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Tue, 2 Apr 2019 12:30:03 -0400 Subject: 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) --- src/core/hle/service/vi/vi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/service') diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 4e17249a9..f1fa6ccd1 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -556,7 +556,7 @@ private: } else { // Wait the current thread until a buffer becomes available ctx.SleepClientThread( - Kernel::GetCurrentThread(), "IHOSBinderDriver::DequeueBuffer", -1, + "IHOSBinderDriver::DequeueBuffer", -1, [=](Kernel::SharedPtr thread, Kernel::HLERequestContext& ctx, Kernel::ThreadWakeupReason reason) { // Repeat TransactParcel DequeueBuffer when a buffer is available -- cgit v1.2.3