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

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
parent 8fe72d7b3c
commit baaede1bf9
10 changed files with 79 additions and 46 deletions

View file

@ -248,9 +248,9 @@ public:
bool is_superuser() const { return m_euid == 0; }
Region* allocate_region_with_vmo(LinearAddress, size_t, Retained<VMObject>&&, size_t offset_in_vmo, String&& name, bool is_readable, bool is_writable);
Region* allocate_file_backed_region(LinearAddress, size_t, RetainPtr<Inode>&&, String&& name, bool is_readable, bool is_writable);
Region* allocate_region(LinearAddress, size_t, String&& name, bool is_readable = true, bool is_writable = true, bool commit = true);
Region* allocate_region_with_vmo(LinearAddress, size_t, Retained<VMObject>&&, size_t offset_in_vmo, String&& name, int prot);
Region* allocate_file_backed_region(LinearAddress, size_t, RetainPtr<Inode>&&, String&& name, int prot);
Region* allocate_region(LinearAddress, size_t, String&& name, int prot = PROT_READ | PROT_WRITE, bool commit = true);
bool deallocate_region(Region& region);
void set_being_inspected(bool b) { m_being_inspected = b; }