From 073653e858abf377fd1ebbdb071809c8830ce99d Mon Sep 17 00:00:00 2001 From: Subv Date: Tue, 14 Jun 2016 18:03:30 -0500 Subject: Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication. All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions. Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed. HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately. --- src/core/hle/service/fs/archive.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/core/hle/service/fs/archive.h') diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h index 21ed9717b..22e659c40 100644 --- a/src/core/hle/service/fs/archive.h +++ b/src/core/hle/service/fs/archive.h @@ -8,7 +8,7 @@ #include #include "common/common_types.h" #include "core/file_sys/archive_backend.h" -#include "core/hle/kernel/session.h" +#include "core/hle/kernel/server_session.h" #include "core/hle/result.h" namespace FileSys { @@ -41,7 +41,7 @@ enum class MediaType : u32 { NAND = 0, SDMC = 1 }; typedef u64 ArchiveHandle; -class File : public Kernel::Session { +class File : public Kernel::ServerSession { public: File(std::unique_ptr&& backend, const FileSys::Path& path); ~File(); @@ -49,14 +49,15 @@ public: std::string GetName() const override { return "Path: " + path.DebugStr(); } - ResultVal SyncRequest() override; + + ResultCode HandleSyncRequest() override; FileSys::Path path; ///< Path of the file u32 priority; ///< Priority of the file. TODO(Subv): Find out what this means std::unique_ptr backend; ///< File backend interface }; -class Directory : public Kernel::Session { +class Directory : public Kernel::ServerSession { public: Directory(std::unique_ptr&& backend, const FileSys::Path& path); ~Directory(); @@ -64,7 +65,8 @@ public: std::string GetName() const override { return "Directory: " + path.DebugStr(); } - ResultVal SyncRequest() override; + + ResultCode HandleSyncRequest() override; FileSys::Path path; ///< Path of the directory std::unique_ptr backend; ///< File backend interface -- cgit v1.2.3