From b143ce8134cc851d065410ba3a825cc6a5bf34e0 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 29 Apr 2023 15:10:09 -0400 Subject: kernel: remove general boost lists --- src/core/hle/kernel/k_event_info.h | 5 +++-- src/core/hle/kernel/k_object_name.h | 8 +++++--- src/core/hle/kernel/k_server_port.h | 4 ++-- src/core/hle/kernel/k_server_session.h | 7 ++++--- src/core/hle/kernel/k_session_request.h | 4 +++- src/core/hle/kernel/k_shared_memory_info.h | 4 ++-- src/core/hle/kernel/k_thread.h | 13 +++++++------ 7 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/core/hle/kernel/k_event_info.h b/src/core/hle/kernel/k_event_info.h index 25b3ff594..eacfa5dc6 100644 --- a/src/core/hle/kernel/k_event_info.h +++ b/src/core/hle/kernel/k_event_info.h @@ -5,14 +5,15 @@ #include -#include +#include "common/intrusive_list.h" #include "core/hle/kernel/slab_helpers.h" #include "core/hle/kernel/svc_types.h" namespace Kernel { -class KEventInfo : public KSlabAllocated, public boost::intrusive::list_base_hook<> { +class KEventInfo : public KSlabAllocated, + public Common::IntrusiveListBaseNode { public: struct InfoCreateThread { u32 thread_id{}; diff --git a/src/core/hle/kernel/k_object_name.h b/src/core/hle/kernel/k_object_name.h index 2d97fc777..a8876fe37 100644 --- a/src/core/hle/kernel/k_object_name.h +++ b/src/core/hle/kernel/k_object_name.h @@ -5,7 +5,8 @@ #include #include -#include + +#include "common/intrusive_list.h" #include "core/hle/kernel/k_light_lock.h" #include "core/hle/kernel/slab_helpers.h" @@ -15,13 +16,14 @@ namespace Kernel { class KObjectNameGlobalData; -class KObjectName : public KSlabAllocated, public boost::intrusive::list_base_hook<> { +class KObjectName : public KSlabAllocated, + public Common::IntrusiveListBaseNode { public: explicit KObjectName(KernelCore&) {} virtual ~KObjectName() = default; static constexpr size_t NameLengthMax = 12; - using List = boost::intrusive::list; + using List = Common::IntrusiveListBaseTraits::ListType; static Result NewFromName(KernelCore& kernel, KAutoObject* obj, const char* name); static Result Delete(KernelCore& kernel, KAutoObject* obj, const char* name); diff --git a/src/core/hle/kernel/k_server_port.h b/src/core/hle/kernel/k_server_port.h index 21c040e62..625280290 100644 --- a/src/core/hle/kernel/k_server_port.h +++ b/src/core/hle/kernel/k_server_port.h @@ -7,7 +7,7 @@ #include #include -#include +#include "common/intrusive_list.h" #include "core/hle/kernel/k_server_session.h" #include "core/hle/kernel/k_synchronization_object.h" @@ -42,7 +42,7 @@ public: bool IsSignaled() const override; private: - using SessionList = boost::intrusive::list; + using SessionList = Common::IntrusiveListBaseTraits::ListType; void CleanupSessions(); diff --git a/src/core/hle/kernel/k_server_session.h b/src/core/hle/kernel/k_server_session.h index 5ee02f556..403891919 100644 --- a/src/core/hle/kernel/k_server_session.h +++ b/src/core/hle/kernel/k_server_session.h @@ -8,7 +8,7 @@ #include #include -#include +#include "common/intrusive_list.h" #include "core/hle/kernel/k_light_lock.h" #include "core/hle/kernel/k_session_request.h" @@ -27,7 +27,7 @@ class KSession; class KThread; class KServerSession final : public KSynchronizationObject, - public boost::intrusive::list_base_hook<> { + public Common::IntrusiveListBaseNode { KERNEL_AUTOOBJECT_TRAITS(KServerSession, KSynchronizationObject); friend class ServiceThread; @@ -67,7 +67,8 @@ private: KSession* m_parent{}; /// List of threads which are pending a reply. - boost::intrusive::list m_request_list{}; + using RequestList = Common::IntrusiveListBaseTraits::ListType; + RequestList m_request_list{}; KSessionRequest* m_current_request{}; KLightLock m_lock; diff --git a/src/core/hle/kernel/k_session_request.h b/src/core/hle/kernel/k_session_request.h index b5f04907b..283669e0a 100644 --- a/src/core/hle/kernel/k_session_request.h +++ b/src/core/hle/kernel/k_session_request.h @@ -5,6 +5,8 @@ #include +#include "common/intrusive_list.h" + #include "core/hle/kernel/k_auto_object.h" #include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_memory_block.h" @@ -16,7 +18,7 @@ namespace Kernel { class KSessionRequest final : public KSlabAllocated, public KAutoObject, - public boost::intrusive::list_base_hook<> { + public Common::IntrusiveListBaseNode { KERNEL_AUTOOBJECT_TRAITS(KSessionRequest, KAutoObject); public: diff --git a/src/core/hle/kernel/k_shared_memory_info.h b/src/core/hle/kernel/k_shared_memory_info.h index 75b73ba39..2d8ff20d6 100644 --- a/src/core/hle/kernel/k_shared_memory_info.h +++ b/src/core/hle/kernel/k_shared_memory_info.h @@ -3,7 +3,7 @@ #pragma once -#include +#include "common/intrusive_list.h" #include "core/hle/kernel/slab_helpers.h" @@ -12,7 +12,7 @@ namespace Kernel { class KSharedMemory; class KSharedMemoryInfo final : public KSlabAllocated, - public boost::intrusive::list_base_hook<> { + public Common::IntrusiveListBaseNode { public: explicit KSharedMemoryInfo(KernelCore&) {} diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index 9c1a41128..f9814ac8f 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -12,7 +12,7 @@ #include #include -#include +#include "common/intrusive_list.h" #include "common/intrusive_red_black_tree.h" #include "common/spin_lock.h" @@ -119,7 +119,7 @@ s32 GetCurrentCoreId(KernelCore& kernel); Core::Memory::Memory& GetCurrentMemory(KernelCore& kernel); class KThread final : public KAutoObjectWithSlabHeapAndContainer, - public boost::intrusive::list_base_hook<>, + public Common::IntrusiveListBaseNode, public KTimerTask { KERNEL_AUTOOBJECT_TRAITS(KThread, KSynchronizationObject); @@ -138,7 +138,7 @@ public: public: using ThreadContext32 = Core::ARM_Interface::ThreadContext32; using ThreadContext64 = Core::ARM_Interface::ThreadContext64; - using WaiterList = boost::intrusive::list; + using WaiterList = Common::IntrusiveListBaseTraits::ListType; /** * Gets the thread's current priority @@ -750,8 +750,9 @@ private: ConditionVariableThreadTreeTraits::TreeType; public: - class LockWithPriorityInheritanceInfo : public KSlabAllocated, - public boost::intrusive::list_base_hook<> { + class LockWithPriorityInheritanceInfo + : public KSlabAllocated, + public Common::IntrusiveListBaseNode { public: explicit LockWithPriorityInheritanceInfo(KernelCore&) {} @@ -839,7 +840,7 @@ public: private: using LockWithPriorityInheritanceInfoList = - boost::intrusive::list; + Common::IntrusiveListBaseTraits::ListType; ConditionVariableThreadTree* m_condvar_tree{}; u64 m_condvar_key{}; -- cgit v1.2.3