Refactor out the wakeup_callback function pointer
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user