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:
@ -71,8 +71,7 @@ void File::Read(Kernel::HLERequestContext& ctx) {
|
||||
rb.PushMappedBuffer(buffer);
|
||||
|
||||
std::chrono::nanoseconds read_timeout_ns{backend->GetReadDelayNs(length)};
|
||||
ctx.SleepClientThread(Kernel::SharedFrom(system.Kernel().GetThreadManager().GetCurrentThread()),
|
||||
"file::read", read_timeout_ns,
|
||||
ctx.SleepClientThread("file::read", read_timeout_ns,
|
||||
[](std::shared_ptr<Kernel::Thread> /*thread*/,
|
||||
Kernel::HLERequestContext& /*ctx*/,
|
||||
Kernel::ThreadWakeupReason /*reason*/) {
|
||||
|
Reference in New Issue
Block a user