mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
Kernel+LibC: Add minherit() and MAP_INHERIT_ZERO
This patch adds the minherit() syscall originally invented by OpenBSD. Only the MAP_INHERIT_ZERO mode is supported for now. If set on an mmap region, that region will be zeroed out on fork().
This commit is contained in:
parent
dd00175ae2
commit
c19b56dc99
8 changed files with 58 additions and 1 deletions
|
@ -81,4 +81,10 @@ int madvise(void* address, size_t size, int advice)
|
|||
int rc = syscall(SC_madvise, address, size, advice);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int minherit(void* address, size_t size, int inherit)
|
||||
{
|
||||
int rc = syscall(SC_minherit, address, size, inherit);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue