mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
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:
parent
4b5a9bab34
commit
da7ea2556e
4 changed files with 10 additions and 6 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue