From 097c25b164ba830b8d4a89926a3e90d297d06d8f Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 6 Mar 2023 20:34:25 -0500 Subject: kernel: convert KPort, KSession --- src/core/hle/kernel/k_session.h | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'src/core/hle/kernel/k_session.h') diff --git a/src/core/hle/kernel/k_session.h b/src/core/hle/kernel/k_session.h index 93e5e6f71..ab553a04c 100644 --- a/src/core/hle/kernel/k_session.h +++ b/src/core/hle/kernel/k_session.h @@ -21,16 +21,15 @@ public: explicit KSession(KernelCore& kernel_); ~KSession() override; - void Initialize(KClientPort* port_, const std::string& name_); - + void Initialize(KClientPort* port, uintptr_t name); void Finalize() override; bool IsInitialized() const override { - return initialized; + return m_initialized; } uintptr_t GetPostDestroyArgument() const override { - return reinterpret_cast(process); + return reinterpret_cast(m_process); } static void PostDestroy(uintptr_t arg); @@ -48,27 +47,23 @@ public: } KClientSession& GetClientSession() { - return client; + return m_client; } KServerSession& GetServerSession() { - return server; + return m_server; } const KClientSession& GetClientSession() const { - return client; + return m_client; } const KServerSession& GetServerSession() const { - return server; + return m_server; } const KClientPort* GetParent() const { - return port; - } - - KClientPort* GetParent() { - return port; + return m_port; } private: @@ -80,20 +75,20 @@ private: }; void SetState(State state) { - atomic_state = static_cast(state); + m_atomic_state = static_cast(state); } State GetState() const { - return static_cast(atomic_state.load(std::memory_order_relaxed)); + return static_cast(m_atomic_state.load()); } - KServerSession server; - KClientSession client; - std::atomic> atomic_state{ - static_cast>(State::Invalid)}; - KClientPort* port{}; - KProcess* process{}; - bool initialized{}; + KServerSession m_server; + KClientSession m_client; + KClientPort* m_port{}; + uintptr_t m_name{}; + KProcess* m_process{}; + std::atomic m_atomic_state{static_cast(State::Invalid)}; + bool m_initialized{}; }; } // namespace Kernel -- cgit v1.2.3