summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-09 08:55:18 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-11 22:07:33 +0200
commit05fee702117dd5000109257ac35efe28c820d828 (patch)
tree3fff26257b7cab86738dcad26e2bf12bf22fcae8 /src/core/hle/kernel
parentServiceFramework: Use separate copy of command buffer (diff)
downloadyuzu-05fee702117dd5000109257ac35efe28c820d828.tar
yuzu-05fee702117dd5000109257ac35efe28c820d828.tar.gz
yuzu-05fee702117dd5000109257ac35efe28c820d828.tar.bz2
yuzu-05fee702117dd5000109257ac35efe28c820d828.tar.lz
yuzu-05fee702117dd5000109257ac35efe28c820d828.tar.xz
yuzu-05fee702117dd5000109257ac35efe28c820d828.tar.zst
yuzu-05fee702117dd5000109257ac35efe28c820d828.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/hle_ipc.cpp9
-rw-r--r--src/core/hle/kernel/hle_ipc.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp
index a60b8ef00..5a74645c7 100644
--- a/src/core/hle/kernel/hle_ipc.cpp
+++ b/src/core/hle/kernel/hle_ipc.cpp
@@ -5,6 +5,7 @@
#include <boost/range/algorithm_ext/erase.hpp>
#include "common/assert.h"
#include "common/common_types.h"
+#include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/server_session.h"
@@ -23,4 +24,12 @@ void SessionRequestHandler::ClientDisconnected(SharedPtr<ServerSession> server_s
HLERequestContext::~HLERequestContext() = default;
+SharedPtr<Object> HLERequestContext::GetIncomingHandle(Handle id_from_cmdbuf) const {
+ return Kernel::g_handle_table.GetGeneric(id_from_cmdbuf);
+}
+
+Handle HLERequestContext::AddOutgoingHandle(SharedPtr<Object> object) {
+ return Kernel::g_handle_table.Create(object).Unwrap();
+}
+
} // namespace Kernel
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h
index aa0046001..f23daa7ea 100644
--- a/src/core/hle/kernel/hle_ipc.h
+++ b/src/core/hle/kernel/hle_ipc.h
@@ -80,6 +80,9 @@ public:
return session;
}
+ SharedPtr<Object> GetIncomingHandle(Handle id_from_cmdbuf) const;
+ Handle AddOutgoingHandle(SharedPtr<Object> object);
+
private:
friend class Service::ServiceFrameworkBase;