1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

UserspaceEmulator: Add some more syscalls

We can now unmap mapped memory, among other things. This is all very
ad-hoc as I'm trying to run UserspaceEmulator inside itself. :^)
This commit is contained in:
Andreas Kling 2020-07-13 12:20:47 +02:00
parent 9b6464010f
commit e0580e2975
4 changed files with 48 additions and 1 deletions

View file

@ -48,6 +48,11 @@ void SoftMMU::add_region(NonnullOwnPtr<Region> region)
m_regions.append(move(region));
}
void SoftMMU::remove_region(Region& region)
{
m_regions.remove_first_matching([&](auto& entry) { return entry.ptr() == &region; });
}
void SoftMMU::set_tls_region(NonnullOwnPtr<Region> region)
{
ASSERT(!m_tls_region);