summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/client_session.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-11-26 00:28:48 +0100
committerbunnei <bunneidev@gmail.com>2019-11-28 18:01:53 +0100
commitc3d3b173d39b7c12fa9b3d5d34040e9377f2888e (patch)
tree61ff05239fe2b3d08bcf775f1528263cffc9aff4 /src/core/hle/kernel/client_session.h
parentMerge pull request #3169 from lioncash/memory (diff)
downloadyuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.gz
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.bz2
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.lz
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.xz
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.zst
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/client_session.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/core/hle/kernel/client_session.h b/src/core/hle/kernel/client_session.h
index 484dd7bc9..b4289a9a8 100644
--- a/src/core/hle/kernel/client_session.h
+++ b/src/core/hle/kernel/client_session.h
@@ -1,4 +1,4 @@
-// Copyright 2016 Citra Emulator Project
+// Copyright 2019 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
@@ -6,7 +6,9 @@
#include <memory>
#include <string>
-#include "core/hle/kernel/object.h"
+
+#include "core/hle/kernel/wait_object.h"
+#include "core/hle/result.h"
union ResultCode;
@@ -18,15 +20,14 @@ namespace Kernel {
class KernelCore;
class Session;
-class ServerSession;
class Thread;
-class ClientSession final : public Object {
+class ClientSession final : public WaitObject {
public:
explicit ClientSession(KernelCore& kernel);
~ClientSession() override;
- friend class ServerSession;
+ friend class Session;
std::string GetTypeName() const override {
return "ClientSession";
@@ -41,9 +42,17 @@ public:
return HANDLE_TYPE;
}
- ResultCode SendSyncRequest(Thread* thread, Memory::Memory& memory);
+ ResultCode SendSyncRequest(std::shared_ptr<Thread> thread, Memory::Memory& memory);
+
+ bool ShouldWait(const Thread* thread) const override;
+
+ void Acquire(Thread* thread) override;
private:
+ static ResultVal<std::shared_ptr<ClientSession>> Create(KernelCore& kernel,
+ std::shared_ptr<Session> parent,
+ std::string name = "Unknown");
+
/// The parent session, which links to the server endpoint.
std::shared_ptr<Session> parent;