Add basic infrastructure to time io better.
This allows the filesystems to more accurately control timing. But they're not actually doing it yet (same timing as before.)
This commit is contained in:
parent
0abd95e784
commit
d6a113809b
12 changed files with 210 additions and 51 deletions
|
@ -555,7 +555,7 @@ size_t MetaFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size)
|
|||
lock_guard guard(lock);
|
||||
IFileSystem *sys = GetHandleOwner(handle);
|
||||
if (sys)
|
||||
return sys->ReadFile(handle,pointer,size);
|
||||
return sys->ReadFile(handle, pointer, size);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
@ -565,7 +565,27 @@ size_t MetaFileSystem::WriteFile(u32 handle, const u8 *pointer, s64 size)
|
|||
lock_guard guard(lock);
|
||||
IFileSystem *sys = GetHandleOwner(handle);
|
||||
if (sys)
|
||||
return sys->WriteFile(handle,pointer,size);
|
||||
return sys->WriteFile(handle, pointer, size);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t MetaFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size, int &usec)
|
||||
{
|
||||
lock_guard guard(lock);
|
||||
IFileSystem *sys = GetHandleOwner(handle);
|
||||
if (sys)
|
||||
return sys->ReadFile(handle, pointer, size, usec);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t MetaFileSystem::WriteFile(u32 handle, const u8 *pointer, s64 size, int &usec)
|
||||
{
|
||||
lock_guard guard(lock);
|
||||
IFileSystem *sys = GetHandleOwner(handle);
|
||||
if (sys)
|
||||
return sys->WriteFile(handle, pointer, size, usec);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue