diff options
author | Tom <tomut@yahoo.com> | 2020-10-31 17:19:18 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-11 12:27:25 +0100 |
commit | 5b38132e3cf5f6bedc045c693577515a192db5ab (patch) | |
tree | dcda657ee7c5124b0cfc2a28a6d33ca7c3bc8a03 /Kernel/VM/PageDirectory.h | |
parent | 2b25a89ab5625b1dd04b10f76b447177fd294f53 (diff) | |
download | serenity-5b38132e3cf5f6bedc045c693577515a192db5ab.zip |
Kernel: Protect the PageDirectory from concurrent access
Diffstat (limited to 'Kernel/VM/PageDirectory.h')
-rw-r--r-- | Kernel/VM/PageDirectory.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/VM/PageDirectory.h b/Kernel/VM/PageDirectory.h index 98c256b920..880524cc78 100644 --- a/Kernel/VM/PageDirectory.h +++ b/Kernel/VM/PageDirectory.h @@ -57,6 +57,8 @@ public: Process* process() { return m_process; } const Process* process() const { return m_process; } + RecursiveSpinLock& get_lock() { return m_lock; } + private: PageDirectory(Process&, const RangeAllocator* parent_range_allocator); PageDirectory(); @@ -67,6 +69,7 @@ private: RefPtr<PhysicalPage> m_directory_table; RefPtr<PhysicalPage> m_directory_pages[4]; HashMap<u32, RefPtr<PhysicalPage>> m_page_tables; + RecursiveSpinLock m_lock; }; } |