Kernel: Make the Process allocate_region* API's understand "int prot".

Instead of having to inspect 'prot' at every call site, make the Process
API's take care of that so we can just pass it through.
This commit is contained in:
Andreas Kling 2019-05-30 16:14:37 +02:00
commit baaede1bf9
Notes: sideshowbarker 2024-07-19 13:50:08 +09:00
10 changed files with 79 additions and 46 deletions

View file

@ -93,5 +93,5 @@ KResultOr<Region*> SharedMemory::mmap(Process& process, LinearAddress laddr, siz
{
if (!vmo())
return KResult(-ENODEV);
return process.allocate_region_with_vmo(laddr, size, *vmo(), offset, name(), prot & PROT_READ, prot & PROT_WRITE);
return process.allocate_region_with_vmo(laddr, size, *vmo(), offset, name(), prot);
}