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:
Unknown W. Brackets 2013-12-27 16:36:51 -08:00
parent 0abd95e784
commit d6a113809b
12 changed files with 210 additions and 51 deletions

View file

@ -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;
}