mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
Kernel: Move syscall implementations out of Process.cpp
This is something I've been meaning to do for a long time, and here we finally go. This patch moves all sys$foo functions out of Process.cpp and into files in Kernel/Syscalls/. It's not exactly one syscall per file (although it could be, but I got a bit tired of the repetitive work here..) This makes hacking on individual syscalls a lot less painful since you don't have to rebuild nearly as much code every time. I'm also hopeful that this makes it easier to understand individual syscalls. :^)
This commit is contained in:
parent
027c450d6d
commit
949aef4aef
73 changed files with 6774 additions and 4485 deletions
|
@ -225,4 +225,17 @@ private:
|
|||
mutable OwnPtr<Bitmap> m_cow_map;
|
||||
};
|
||||
|
||||
inline unsigned prot_to_region_access_flags(int prot)
|
||||
{
|
||||
unsigned access = 0;
|
||||
if (prot & PROT_READ)
|
||||
access |= Region::Access::Read;
|
||||
if (prot & PROT_WRITE)
|
||||
access |= Region::Access::Write;
|
||||
if (prot & PROT_EXEC)
|
||||
access |= Region::Access::Execute;
|
||||
return access;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue