summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_client_session.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-08 08:30:17 +0200
committerGitHub <noreply@github.com>2021-05-08 08:30:17 +0200
commitfaa067f175cbf5e916ed75776817f0046e6731c4 (patch)
tree8ab02a72a6e4d6578848c8da2c02af02684aeec7 /src/core/hle/kernel/k_client_session.h
parentMerge pull request #6287 from lioncash/ldr-copy (diff)
parenthle: kernel: KPageTable: CanContain should not be constexpr. (diff)
downloadyuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.gz
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.bz2
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.lz
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.xz
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.tar.zst
yuzu-faa067f175cbf5e916ed75776817f0046e6731c4.zip
Diffstat (limited to 'src/core/hle/kernel/k_client_session.h')
-rw-r--r--src/core/hle/kernel/k_client_session.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_client_session.h b/src/core/hle/kernel/k_client_session.h
new file mode 100644
index 000000000..6476a588b
--- /dev/null
+++ b/src/core/hle/kernel/k_client_session.h
@@ -0,0 +1,61 @@
+// Copyright 2021 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <memory>
+#include <string>
+
+#include "core/hle/kernel/k_auto_object.h"
+#include "core/hle/kernel/k_synchronization_object.h"
+#include "core/hle/kernel/slab_helpers.h"
+#include "core/hle/result.h"
+
+union ResultCode;
+
+namespace Core::Memory {
+class Memory;
+}
+
+namespace Core::Timing {
+class CoreTiming;
+}
+
+namespace Kernel {
+
+class KernelCore;
+class KSession;
+class KThread;
+
+class KClientSession final
+ : public KAutoObjectWithSlabHeapAndContainer<KClientSession, KAutoObjectWithList> {
+ KERNEL_AUTOOBJECT_TRAITS(KClientSession, KAutoObject);
+
+public:
+ explicit KClientSession(KernelCore& kernel);
+ virtual ~KClientSession();
+
+ void Initialize(KSession* parent_, std::string&& name_) {
+ // Set member variables.
+ parent = parent_;
+ name = std::move(name_);
+ }
+
+ virtual void Destroy() override;
+ static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
+
+ KSession* GetParent() const {
+ return parent;
+ }
+
+ ResultCode SendSyncRequest(KThread* thread, Core::Memory::Memory& memory,
+ Core::Timing::CoreTiming& core_timing);
+
+ void OnServerClosed();
+
+private:
+ KSession* parent{};
+};
+
+} // namespace Kernel