kern: use tree for IoPool regions instead of list

This commit is contained in:
Michael Scire 2023-02-21 07:54:57 -07:00
parent b7846247aa
commit 8eef019e3d
3 changed files with 42 additions and 13 deletions

View file

@ -24,10 +24,10 @@ namespace ams::kern {
class KIoPool final : public KAutoObjectWithSlabHeapAndContainer<KIoPool, KAutoObjectWithList> {
MESOSPHERE_AUTOOBJECT_TRAITS(KIoPool, KAutoObject);
private:
using IoRegionList = util::IntrusiveListMemberTraits<&KIoRegion::m_pool_list_node>::ListType;
using IoRegionTree = util::IntrusiveRedBlackTreeBaseTraits<KIoRegion>::TreeType<KIoRegion>;
private:
KLightLock m_lock;
IoRegionList m_io_region_list;
IoRegionTree m_io_region_tree;
ams::svc::IoPoolType m_pool_type;
bool m_is_initialized;
public: