mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +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:
parent
8fe72d7b3c
commit
baaede1bf9
Notes:
sideshowbarker
2024-07-19 13:50:08 +09:00
Author: https://github.com/awesomekling
Commit: baaede1bf9
10 changed files with 79 additions and 46 deletions
|
@ -35,7 +35,7 @@ KResultOr<Region*> InodeFile::mmap(Process& process, LinearAddress preferred_lad
|
|||
region_name = "Memory-mapped file";
|
||||
#endif
|
||||
InterruptDisabler disabler;
|
||||
auto* region = process.allocate_file_backed_region(preferred_laddr, size, inode(), move(region_name), prot & PROT_READ, prot & PROT_WRITE);
|
||||
auto* region = process.allocate_file_backed_region(preferred_laddr, size, inode(), move(region_name), prot);
|
||||
if (!region)
|
||||
return KResult(-ENOMEM);
|
||||
return region;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue