mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:37:45 +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
|
@ -49,6 +49,8 @@
|
|||
#define MADV_SET_NONVOLATILE 0x200
|
||||
#define MADV_GET_VOLATILE 0x400
|
||||
|
||||
#define MAP_INHERIT_ZERO 1
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
void* mmap(void* addr, size_t, int prot, int flags, int fd, off_t);
|
||||
|
@ -58,5 +60,6 @@ int munmap(void*, size_t);
|
|||
int mprotect(void*, size_t, int prot);
|
||||
int set_mmap_name(void*, size_t, const char*);
|
||||
int madvise(void*, size_t, int advice);
|
||||
int minherit(void*, size_t, int inherit);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue