summaryrefslogtreecommitdiff
path: root/Kernel/VM/Region.h
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-05-26 02:47:47 -0700
committerAndreas Kling <kling@serenityos.org>2021-05-26 20:24:32 +0200
commite6f73d69a2daf582c75df81229769db7477bd7fd (patch)
tree03158e61104ee42ffe82ac892a9c7765931896a0 /Kernel/VM/Region.h
parente0da61f9d6e55a92bf06bbe05163b8e8cf7a3b31 (diff)
downloadserenity-e6f73d69a2daf582c75df81229769db7477bd7fd.zip
Kernel: Switch Region to IntrusiveList from InlineLinkedList
Diffstat (limited to 'Kernel/VM/Region.h')
-rw-r--r--Kernel/VM/Region.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/Kernel/VM/Region.h b/Kernel/VM/Region.h
index 2bdfad6d2d..ecbe758179 100644
--- a/Kernel/VM/Region.h
+++ b/Kernel/VM/Region.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/EnumBits.h>
-#include <AK/InlineLinkedList.h>
+#include <AK/IntrusiveList.h>
#include <AK/String.h>
#include <AK/WeakPtr.h>
#include <AK/Weakable.h>
@@ -29,8 +29,7 @@ enum class ShouldFlushTLB {
};
class Region final
- : public InlineLinkedListNode<Region>
- , public Weakable<Region>
+ : public Weakable<Region>
, public PurgeablePageRanges {
friend class MemoryManager;
@@ -211,10 +210,6 @@ public:
void remap();
- // For InlineLinkedListNode
- Region* m_next { nullptr };
- Region* m_prev { nullptr };
-
bool remap_vmobject_page_range(size_t page_index, size_t page_count);
bool is_volatile(VirtualAddress vaddr, size_t size) const;
@@ -267,6 +262,10 @@ private:
bool m_mmap : 1 { false };
bool m_syscall_region : 1 { false };
WeakPtr<Process> m_owner;
+ IntrusiveListNode<Region> m_list_node;
+
+public:
+ using List = IntrusiveList<Region, RawPtr<Region>, &Region::m_list_node>;
};
AK_ENUM_BITWISE_OPERATORS(Region::Access)