mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-11 21:30:05 +00:00
Refactor out the wakeup_callback function pointer
This commit is contained in:
parent
7019561fd5
commit
116d22d562
24 changed files with 533 additions and 295 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue