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

Kernel: Take the RegionTree spinlock when inspecting tree from outside

This patch adds RegionTree::get_lock() which exposes the internal lock
inside RegionTree. We can then lock it from the outside when doing
lookups or traversal.

This solution is not very beautiful, we should find a way to protect
this data with SpinlockProtected or something similar. This is a stopgap
patch to try and fix the currently flaky CI.
This commit is contained in:
Andreas Kling 2022-04-05 01:07:23 +02:00
parent e3e1d79a7d
commit f0f97e1db0
4 changed files with 21 additions and 3 deletions

View file

@ -26,8 +26,6 @@ public:
PageDirectory& page_directory() { return *m_page_directory; }
PageDirectory const& page_directory() const { return *m_page_directory; }
size_t region_count() const { return m_region_tree.regions().size(); }
auto& regions() { return m_region_tree.regions(); }
auto const& regions() const { return m_region_tree.regions(); }