diff --git a/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_debug.hpp b/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_debug.hpp index 4dc3f9682..96e2a9119 100644 --- a/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_debug.hpp +++ b/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_debug.hpp @@ -31,7 +31,6 @@ namespace ams::kern::arch::arm64 { MESOSPHERE_AUTOOBJECT_TRAITS(KDebug, KSynchronizationObject); public: explicit KDebug() { /* ... */ } - virtual ~KDebug() { /* ... */ } static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } public: diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_alpha.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_alpha.hpp index 78711de56..f7a4fb6d4 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_alpha.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_alpha.hpp @@ -30,8 +30,6 @@ namespace ams::kern { /* ... */ } - virtual ~KAlpha() { /* ... */ } - /* virtual void Finalize() override; */ virtual bool IsInitialized() const override { return false /* TODO */; } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object.hpp index ff8b26bcb..dd4d6574e 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object.hpp @@ -75,7 +75,6 @@ namespace ams::kern { static KAutoObject *Create(KAutoObject *ptr); public: constexpr ALWAYS_INLINE explicit KAutoObject() : m_next_closed_object(nullptr), m_ref_count(0) { MESOSPHERE_ASSERT_THIS(); } - virtual ~KAutoObject() { MESOSPHERE_ASSERT_THIS(); } /* Destroy is responsible for destroying the auto object's resources when ref_count hits zero. */ virtual void Destroy() { MESOSPHERE_ASSERT_THIS(); } @@ -139,8 +138,10 @@ namespace ams::kern { private: friend class KAutoObjectWithListContainer; private: - util::IntrusiveRedBlackTreeNode list_node; + util::IntrusiveRedBlackTreeNode m_list_node; public: + constexpr ALWAYS_INLINE KAutoObjectWithList() : m_list_node() { /* ... */ } + static ALWAYS_INLINE int Compare(const KAutoObjectWithList &lhs, const KAutoObjectWithList &rhs) { const u64 lid = lhs.GetId(); const u64 rid = rhs.GetId(); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp index 958426b67..7d96d47fb 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp @@ -24,7 +24,7 @@ namespace ams::kern { NON_COPYABLE(KAutoObjectWithListContainer); NON_MOVEABLE(KAutoObjectWithListContainer); public: - using ListType = util::IntrusiveRedBlackTreeMemberTraits<&KAutoObjectWithList::list_node>::TreeType; + using ListType = util::IntrusiveRedBlackTreeMemberTraits<&KAutoObjectWithList::m_list_node>::TreeType; public: class ListAccessor : public KScopedLightLock { private: diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_beta.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_beta.hpp index 0acf0a4ed..37e78b6c5 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_beta.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_beta.hpp @@ -37,8 +37,6 @@ namespace ams::kern { /* ... */ } - virtual ~KBeta() { /* ... */ } - /* virtual void Finalize() override; */ virtual bool IsInitialized() const override { return false /* TODO */; } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_client_port.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_client_port.hpp index a66006a9a..ce6665628 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_client_port.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_client_port.hpp @@ -34,7 +34,6 @@ namespace ams::kern { KPort *m_parent; public: constexpr KClientPort() : m_num_sessions(), m_peak_sessions(), m_max_sessions(), m_parent() { /* ... */ } - virtual ~KClientPort() { /* ... */ } void Initialize(KPort *parent, s32 max_sessions); void OnSessionFinalized(); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_client_session.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_client_session.hpp index 3e6de1822..8ff0bbf23 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_client_session.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_client_session.hpp @@ -21,13 +21,12 @@ namespace ams::kern { class KSession; - class KClientSession final : public KAutoObjectWithSlabHeapAndContainer { + class KClientSession final : public KAutoObject { MESOSPHERE_AUTOOBJECT_TRAITS(KClientSession, KAutoObject); private: KSession *m_parent; public: constexpr KClientSession() : m_parent() { /* ... */ } - virtual ~KClientSession() { /* ... */ } void Initialize(KSession *parent) { /* Set member variables. */ diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_code_memory.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_code_memory.hpp index 0875216ac..d51a21a5f 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_code_memory.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_code_memory.hpp @@ -35,8 +35,6 @@ namespace ams::kern { /* ... */ } - virtual ~KCodeMemory() { /* ... */ } - Result Initialize(KProcessAddress address, size_t size); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_debug_base.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_debug_base.hpp index e93f1437e..9edfa0c85 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_debug_base.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_debug_base.hpp @@ -33,7 +33,6 @@ namespace ams::kern { KProcess::State m_old_process_state; public: explicit KDebugBase() { /* ... */ } - virtual ~KDebugBase() { /* ... */ } protected: bool Is64Bit() const; public: diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_device_address_space.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_device_address_space.hpp index 82ed15c90..45068a39b 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_device_address_space.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_device_address_space.hpp @@ -31,7 +31,6 @@ namespace ams::kern { bool m_is_initialized; public: constexpr KDeviceAddressSpace() : m_lock(), m_table(), m_space_address(), m_space_size(), m_is_initialized() { /* ... */ } - virtual ~KDeviceAddressSpace() { /* ... */ } Result Initialize(u64 address, u64 size); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_event.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_event.hpp index 728432146..4a3167784 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_event.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_event.hpp @@ -36,8 +36,6 @@ namespace ams::kern { /* ... */ } - virtual ~KEvent() { /* ... */ } - void Initialize(); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_interrupt_event.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_interrupt_event.hpp index 08808ab94..0d641e585 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_interrupt_event.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_interrupt_event.hpp @@ -32,7 +32,6 @@ namespace ams::kern { bool m_is_initialized; public: constexpr KInterruptEvent() : m_interrupt_id(-1), m_core_id(-1), m_is_initialized(false) { /* ... */ } - virtual ~KInterruptEvent() { /* ... */ } Result Initialize(int32_t interrupt_name, ams::svc::InterruptType type); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_light_client_session.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_light_client_session.hpp index bb55ad577..2e2c0e29f 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_light_client_session.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_light_client_session.hpp @@ -21,13 +21,12 @@ namespace ams::kern { class KLightSession; - class KLightClientSession final : public KAutoObjectWithSlabHeapAndContainer { + class KLightClientSession final : public KAutoObject { MESOSPHERE_AUTOOBJECT_TRAITS(KLightClientSession, KAutoObject); private: KLightSession *m_parent; public: constexpr KLightClientSession() : m_parent() { /* ... */ } - virtual ~KLightClientSession() { /* ... */ } void Initialize(KLightSession *parent) { /* Set member variables. */ diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_light_server_session.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_light_server_session.hpp index 8d8148c31..64c567294 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_light_server_session.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_light_server_session.hpp @@ -23,7 +23,7 @@ namespace ams::kern { class KLightSession; - class KLightServerSession final : public KAutoObjectWithSlabHeapAndContainer, public util::IntrusiveListBaseNode { + class KLightServerSession final : public KAutoObject, public util::IntrusiveListBaseNode { MESOSPHERE_AUTOOBJECT_TRAITS(KLightServerSession, KAutoObject); private: KLightSession *m_parent; @@ -33,7 +33,6 @@ namespace ams::kern { KThread *m_server_thread; public: constexpr KLightServerSession() : m_parent(), m_request_queue(), m_server_queue(), m_current_request(), m_server_thread() { /* ... */ } - virtual ~KLightServerSession() { /* ... */ } void Initialize(KLightSession *parent) { /* Set member variables. */ diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_light_session.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_light_session.hpp index 4b0c46552..fba1b46e2 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_light_session.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_light_session.hpp @@ -52,8 +52,6 @@ namespace ams::kern { /* ... */ } - virtual ~KLightSession() { /* ... */ } - void Initialize(KClientPort *client_port, uintptr_t name); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_port.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_port.hpp index 2929fad62..80a99cbb4 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_port.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_port.hpp @@ -42,7 +42,6 @@ namespace ams::kern { bool m_is_light; public: constexpr KPort() : m_server(), m_client(), m_name(), m_state(State::Invalid), m_is_light() { /* ... */ } - virtual ~KPort() { /* ... */ } static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp index af3e59c7b..83267abbb 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp @@ -143,7 +143,6 @@ namespace ams::kern { } public: KProcess() { /* ... */ } - virtual ~KProcess() { /* ... */ } Result Initialize(const ams::svc::CreateProcessParameter ¶ms, const KPageGroup &pg, const u32 *caps, s32 num_caps, KResourceLimit *res_limit, KMemoryManager::Pool pool, bool immortal); Result Initialize(const ams::svc::CreateProcessParameter ¶ms, svc::KUserPointer caps, s32 num_caps, KResourceLimit *res_limit, KMemoryManager::Pool pool); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_readable_event.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_readable_event.hpp index 9eaf7e573..8889ccd22 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_readable_event.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_readable_event.hpp @@ -28,7 +28,6 @@ namespace ams::kern { KEvent *m_parent; public: constexpr explicit KReadableEvent() : KSynchronizationObject(), m_is_signaled(), m_parent() { MESOSPHERE_ASSERT_THIS(); } - virtual ~KReadableEvent() { MESOSPHERE_ASSERT_THIS(); } constexpr void Initialize(KEvent *parent) { MESOSPHERE_ASSERT_THIS(); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_resource_limit.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_resource_limit.hpp index f3e1cc67d..822dbb853 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_resource_limit.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_resource_limit.hpp @@ -34,7 +34,6 @@ namespace ams::kern { KLightConditionVariable m_cond_var; public: constexpr ALWAYS_INLINE KResourceLimit() : m_limit_values(), m_current_values(), m_current_hints(), m_peak_values(), m_lock(), m_waiter_count(), m_cond_var() { /* ... */ } - virtual ~KResourceLimit() { /* ... */ } static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_server_port.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_server_port.hpp index ef79fba36..7b3bfe8ff 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_server_port.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_server_port.hpp @@ -35,7 +35,6 @@ namespace ams::kern { KPort *m_parent; public: constexpr KServerPort() : m_session_list(), m_light_session_list(), m_parent() { /* ... */ } - virtual ~KServerPort() { /* ... */ } void Initialize(KPort *parent); void EnqueueSession(KServerSession *session); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_server_session.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_server_session.hpp index 9216a5ba1..ccdcabe25 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_server_session.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_server_session.hpp @@ -34,7 +34,6 @@ namespace ams::kern { KLightLock m_lock; public: constexpr KServerSession() : m_parent(), m_request_list(), m_current_request(), m_lock() { /* ... */ } - virtual ~KServerSession() { /* ... */ } virtual void Destroy() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_session.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_session.hpp index 2173c3964..fc88341c1 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_session.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_session.hpp @@ -57,8 +57,6 @@ namespace ams::kern { /* ... */ } - virtual ~KSession() { /* ... */ } - void Initialize(KClientPort *client_port, uintptr_t name); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_session_request.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_session_request.hpp index 35e4d3bfe..08572933d 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_session_request.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_session_request.hpp @@ -131,7 +131,6 @@ namespace ams::kern { size_t m_size; public: constexpr KSessionRequest() : m_mappings(), m_thread(), m_server(), m_event(), m_address(), m_size() { /* ... */ } - virtual ~KSessionRequest() { /* ... */ } static KSessionRequest *Create() { KSessionRequest *req = KSessionRequest::Allocate(); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_shared_memory.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_shared_memory.hpp index d69c22e6a..66acfd42e 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_shared_memory.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_shared_memory.hpp @@ -41,8 +41,6 @@ namespace ams::kern { /* ... */ } - virtual ~KSharedMemory() { /* ... */ } - Result Initialize(KProcess *owner, size_t size, ams::svc::MemoryPermission own_perm, ams::svc::MemoryPermission rem_perm); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_synchronization_object.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_synchronization_object.hpp index 1465bbe69..70c3499ab 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_synchronization_object.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_synchronization_object.hpp @@ -33,7 +33,6 @@ namespace ams::kern { ThreadListNode *m_thread_list_tail; protected: constexpr ALWAYS_INLINE explicit KSynchronizationObject() : KAutoObjectWithList(), m_thread_list_head(), m_thread_list_tail() { MESOSPHERE_ASSERT_THIS(); } - virtual ~KSynchronizationObject() { MESOSPHERE_ASSERT_THIS(); } virtual void OnFinalizeSynchronizationObject() { MESOSPHERE_ASSERT_THIS(); } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_thread.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_thread.hpp index b3d1b4109..898f7a403 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_thread.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_thread.hpp @@ -239,10 +239,7 @@ namespace ams::kern { public: constexpr KThread() : m_wait_result(svc::ResultNoSynchronizationObject()), m_debug_exception_result(ResultSuccess()) { /* ... */ } - virtual ~KThread() { /* ... */ } - Result Initialize(KThreadFunction func, uintptr_t arg, void *kern_stack_top, KProcessAddress user_stack_top, s32 prio, s32 virt_core, KProcess *owner, ThreadType type); - private: static Result InitializeThread(KThread *thread, KThreadFunction func, uintptr_t arg, KProcessAddress user_stack_top, s32 prio, s32 virt_core, KProcess *owner, ThreadType type); public: diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_transfer_memory.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_transfer_memory.hpp index 0abb0dbce..0e2d8e8ab 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_transfer_memory.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_transfer_memory.hpp @@ -35,8 +35,6 @@ namespace ams::kern { /* ... */ } - virtual ~KTransferMemory() { /* ... */ } - Result Initialize(KProcessAddress addr, size_t size, ams::svc::MemoryPermission own_perm); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_writable_event.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_writable_event.hpp index ffdbbb57e..bcb6db6bd 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_writable_event.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_writable_event.hpp @@ -28,7 +28,6 @@ namespace ams::kern { KEvent *m_parent; public: constexpr explicit KWritableEvent() : m_parent(nullptr) { /* ... */ } - virtual ~KWritableEvent() { /* ... */ } virtual void Destroy() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_slab_helpers.hpp b/libraries/libmesosphere/include/mesosphere/kern_slab_helpers.hpp index ce27e13c5..8a6b96aa7 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_slab_helpers.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_slab_helpers.hpp @@ -74,7 +74,6 @@ namespace ams::kern { }; public: constexpr KAutoObjectWithSlabHeapAndContainer() : Base() { /* ... */ } - virtual ~KAutoObjectWithSlabHeapAndContainer() { /* ... */ } virtual void Destroy() override { const bool is_initialized = this->IsInitialized();