summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/client_session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/client_session.h')
-rw-r--r--src/core/hle/kernel/client_session.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/core/hle/kernel/client_session.h b/src/core/hle/kernel/client_session.h
index 09cdff588..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,20 +6,28 @@
#include <memory>
#include <string>
-#include "core/hle/kernel/object.h"
+
+#include "core/hle/kernel/wait_object.h"
+#include "core/hle/result.h"
union ResultCode;
+namespace Memory {
+class Memory;
+}
+
namespace Kernel {
class KernelCore;
class Session;
-class ServerSession;
class Thread;
-class ClientSession final : public Object {
+class ClientSession final : public WaitObject {
public:
- friend class ServerSession;
+ explicit ClientSession(KernelCore& kernel);
+ ~ClientSession() override;
+
+ friend class Session;
std::string GetTypeName() const override {
return "ClientSession";
@@ -34,11 +42,16 @@ public:
return HANDLE_TYPE;
}
- ResultCode SendSyncRequest(SharedPtr<Thread> thread);
+ ResultCode SendSyncRequest(std::shared_ptr<Thread> thread, Memory::Memory& memory);
+
+ bool ShouldWait(const Thread* thread) const override;
+
+ void Acquire(Thread* thread) override;
private:
- explicit ClientSession(KernelCore& kernel);
- ~ClientSession() override;
+ 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;