summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2017-06-08 23:52:30 -0700
committerGravatar Yuri Kunde Schlesner2017-06-11 13:07:33 -0700
commit20e5abb30807d4e0e34c79c049252f0872e47ca7 (patch)
tree54284838ca89629576a046807b6965fe11507880 /src/core/hle/kernel
parentRemove unused import in break_points.cpp (#2763) (diff)
downloadyuzu-20e5abb30807d4e0e34c79c049252f0872e47ca7.tar.gz
yuzu-20e5abb30807d4e0e34c79c049252f0872e47ca7.tar.xz
yuzu-20e5abb30807d4e0e34c79c049252f0872e47ca7.zip
ServiceFramework: Use separate copy of command buffer
Copy the IPC command buffer to/from the request context before/after the handler is invoked. This is part of a move away from using global data for handling IPC requests.
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/hle_ipc.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h
index c30184eab..aa0046001 100644
--- a/src/core/hle/kernel/hle_ipc.h
+++ b/src/core/hle/kernel/hle_ipc.h
@@ -4,8 +4,11 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <array>
7#include <memory> 8#include <memory>
8#include <vector> 9#include <vector>
10#include "common/common_types.h"
11#include "core/hle/ipc.h"
9#include "core/hle/kernel/kernel.h" 12#include "core/hle/kernel/kernel.h"
10#include "core/hle/kernel/server_session.h" 13#include "core/hle/kernel/server_session.h"
11 14
@@ -65,8 +68,8 @@ public:
65 ~HLERequestContext(); 68 ~HLERequestContext();
66 69
67 /// Returns a pointer to the IPC command buffer for this request. 70 /// Returns a pointer to the IPC command buffer for this request.
68 u32* CommandBuffer() const { 71 u32* CommandBuffer() {
69 return cmd_buf; 72 return cmd_buf.data();
70 } 73 }
71 74
72 /** 75 /**
@@ -80,7 +83,7 @@ public:
80private: 83private:
81 friend class Service::ServiceFrameworkBase; 84 friend class Service::ServiceFrameworkBase;
82 85
83 u32* cmd_buf = nullptr; 86 std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf;
84 SharedPtr<ServerSession> session; 87 SharedPtr<ServerSession> session;
85}; 88};
86 89