Kernel: Add RegionTree::remove(Region&)

This allows clients to remove a region from the tree without reaching
into the RegionTree internals.
This commit is contained in:
Andreas Kling 2022-04-05 11:57:53 +02:00
commit da7ea2556e
Notes: sideshowbarker 2024-07-17 14:25:23 +09:00
4 changed files with 10 additions and 6 deletions

View file

@ -164,4 +164,10 @@ ErrorOr<NonnullOwnPtr<Memory::Region>> RegionTree::create_identity_mapped_region
return region;
}
bool RegionTree::remove(Region& region)
{
SpinlockLocker locker(m_lock);
return m_regions.remove(region.range().base().get());
}
}