Refactor out the wakeup_callback function pointer

This commit is contained in:
Hamish Milne 2020-01-06 20:03:40 +00:00 committed by zhupengfei
parent 7019561fd5
commit 116d22d562
24 changed files with 533 additions and 295 deletions

View file

@ -71,12 +71,7 @@ void File::Read(Kernel::HLERequestContext& ctx) {
rb.PushMappedBuffer(buffer);
std::chrono::nanoseconds read_timeout_ns{backend->GetReadDelayNs(length)};
ctx.SleepClientThread("file::read", read_timeout_ns,
[](std::shared_ptr<Kernel::Thread> /*thread*/,
Kernel::HLERequestContext& /*ctx*/,
Kernel::ThreadWakeupReason /*reason*/) {
// Nothing to do here
});
ctx.SleepClientThread("file::read", read_timeout_ns, nullptr);
}
void File::Write(Kernel::HLERequestContext& ctx) {

View file

@ -76,12 +76,7 @@ void FS_USER::OpenFile(Kernel::HLERequestContext& ctx) {
LOG_ERROR(Service_FS, "failed to get a handle for file {}", file_path.DebugStr());
}
ctx.SleepClientThread("fs_user::open", open_timeout_ns,
[](std::shared_ptr<Kernel::Thread> /*thread*/,
Kernel::HLERequestContext& /*ctx*/,
Kernel::ThreadWakeupReason /*reason*/) {
// Nothing to do here
});
ctx.SleepClientThread("fs_user::open", open_timeout_ns, nullptr);
}
void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
@ -134,12 +129,7 @@ void FS_USER::OpenFileDirectly(Kernel::HLERequestContext& ctx) {
file_path.DebugStr(), mode.hex, attributes);
}
ctx.SleepClientThread("fs_user::open_directly", open_timeout_ns,
[](std::shared_ptr<Kernel::Thread> /*thread*/,
Kernel::HLERequestContext& /*ctx*/,
Kernel::ThreadWakeupReason /*reason*/) {
// Nothing to do here
});
ctx.SleepClientThread("fs_user::open_directly", open_timeout_ns, nullptr);
}
void FS_USER::DeleteFile(Kernel::HLERequestContext& ctx) {