1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:47:34 +00:00

Kernel: Protect the PageDirectory from concurrent access

This commit is contained in:
Tom 2020-10-31 17:19:18 -06:00 committed by Andreas Kling
parent 2b25a89ab5
commit 5b38132e3c
4 changed files with 14 additions and 3 deletions

View file

@ -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;
};
}