forked from suyu/suyu
hle: service: filesystem: Create a service thread where appropriate.
This commit is contained in:
parent
11120b5b1e
commit
2afef2b609
1 changed files with 8 additions and 5 deletions
|
@ -58,7 +58,8 @@ enum class FileSystemType : u8 {
|
||||||
class IStorage final : public ServiceFramework<IStorage> {
|
class IStorage final : public ServiceFramework<IStorage> {
|
||||||
public:
|
public:
|
||||||
explicit IStorage(Core::System& system_, FileSys::VirtualFile backend_)
|
explicit IStorage(Core::System& system_, FileSys::VirtualFile backend_)
|
||||||
: ServiceFramework{system_, "IStorage"}, backend(std::move(backend_)) {
|
: ServiceFramework{system_, "IStorage", ServiceThreadType::CreateNew},
|
||||||
|
backend(std::move(backend_)) {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &IStorage::Read, "Read"},
|
{0, &IStorage::Read, "Read"},
|
||||||
{1, nullptr, "Write"},
|
{1, nullptr, "Write"},
|
||||||
|
@ -116,7 +117,8 @@ private:
|
||||||
class IFile final : public ServiceFramework<IFile> {
|
class IFile final : public ServiceFramework<IFile> {
|
||||||
public:
|
public:
|
||||||
explicit IFile(Core::System& system_, FileSys::VirtualFile backend_)
|
explicit IFile(Core::System& system_, FileSys::VirtualFile backend_)
|
||||||
: ServiceFramework{system_, "IFile"}, backend(std::move(backend_)) {
|
: ServiceFramework{system_, "IFile", ServiceThreadType::CreateNew},
|
||||||
|
backend(std::move(backend_)) {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &IFile::Read, "Read"},
|
{0, &IFile::Read, "Read"},
|
||||||
{1, &IFile::Write, "Write"},
|
{1, &IFile::Write, "Write"},
|
||||||
|
@ -252,7 +254,8 @@ static void BuildEntryIndex(std::vector<FileSys::Entry>& entries, const std::vec
|
||||||
class IDirectory final : public ServiceFramework<IDirectory> {
|
class IDirectory final : public ServiceFramework<IDirectory> {
|
||||||
public:
|
public:
|
||||||
explicit IDirectory(Core::System& system_, FileSys::VirtualDir backend_)
|
explicit IDirectory(Core::System& system_, FileSys::VirtualDir backend_)
|
||||||
: ServiceFramework{system_, "IDirectory"}, backend(std::move(backend_)) {
|
: ServiceFramework{system_, "IDirectory", ServiceThreadType::CreateNew},
|
||||||
|
backend(std::move(backend_)) {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &IDirectory::Read, "Read"},
|
{0, &IDirectory::Read, "Read"},
|
||||||
{1, &IDirectory::GetEntryCount, "GetEntryCount"},
|
{1, &IDirectory::GetEntryCount, "GetEntryCount"},
|
||||||
|
@ -308,8 +311,8 @@ private:
|
||||||
class IFileSystem final : public ServiceFramework<IFileSystem> {
|
class IFileSystem final : public ServiceFramework<IFileSystem> {
|
||||||
public:
|
public:
|
||||||
explicit IFileSystem(Core::System& system_, FileSys::VirtualDir backend_, SizeGetter size_)
|
explicit IFileSystem(Core::System& system_, FileSys::VirtualDir backend_, SizeGetter size_)
|
||||||
: ServiceFramework{system_, "IFileSystem"}, backend{std::move(backend_)}, size{std::move(
|
: ServiceFramework{system_, "IFileSystem", ServiceThreadType::CreateNew},
|
||||||
size_)} {
|
backend{std::move(backend_)}, size{std::move(size_)} {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &IFileSystem::CreateFile, "CreateFile"},
|
{0, &IFileSystem::CreateFile, "CreateFile"},
|
||||||
{1, &IFileSystem::DeleteFile, "DeleteFile"},
|
{1, &IFileSystem::DeleteFile, "DeleteFile"},
|
||||||
|
|
Loading…
Reference in a new issue