diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-06-19 01:05:12 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-06-19 01:05:12 +0200 |
commit | 0dfafdbe593581e013e0515cc329a48e6aca0a42 (patch) | |
tree | f64ee4d25e2c1fb285173cdebec379002a207201 /src/core/hle/kernel | |
parent | Merge pull request #2776 from wwylele/geo-factor (diff) | |
download | yuzu-0dfafdbe593581e013e0515cc329a48e6aca0a42.tar yuzu-0dfafdbe593581e013e0515cc329a48e6aca0a42.tar.gz yuzu-0dfafdbe593581e013e0515cc329a48e6aca0a42.tar.bz2 yuzu-0dfafdbe593581e013e0515cc329a48e6aca0a42.tar.lz yuzu-0dfafdbe593581e013e0515cc329a48e6aca0a42.tar.xz yuzu-0dfafdbe593581e013e0515cc329a48e6aca0a42.tar.zst yuzu-0dfafdbe593581e013e0515cc329a48e6aca0a42.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 5 | ||||
-rw-r--r-- | src/core/hle/kernel/hle_ipc.h | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 6cf1886cf..1cac1d0c9 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -23,6 +23,11 @@ void SessionRequestHandler::ClientDisconnected(SharedPtr<ServerSession> server_s boost::range::remove_erase(connected_sessions, server_session); } +HLERequestContext::HLERequestContext(SharedPtr<ServerSession> session) + : session(std::move(session)) { + cmd_buf[0] = 0; +} + HLERequestContext::~HLERequestContext() = default; SharedPtr<Object> HLERequestContext::GetIncomingHandle(u32 id_from_cmdbuf) const { diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index cbb109d8f..35795fc1d 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -84,6 +84,7 @@ protected: */ class HLERequestContext { public: + HLERequestContext(SharedPtr<ServerSession> session); ~HLERequestContext(); /// Returns a pointer to the IPC command buffer for this request. @@ -118,14 +119,14 @@ public: */ void ClearIncomingObjects(); -private: - friend class Service::ServiceFrameworkBase; - + /// Populates this context with data from the requesting process/thread. ResultCode PopulateFromIncomingCommandBuffer(const u32_le* src_cmdbuf, Process& src_process, HandleTable& src_table); + /// Writes data from this context back to the requesting process/thread. ResultCode WriteToOutgoingCommandBuffer(u32_le* dst_cmdbuf, Process& dst_process, HandleTable& dst_table) const; +private: std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; SharedPtr<ServerSession> session; // TODO(yuriks): Check common usage of this and optimize size accordingly |