diff options
author | dzwdz | 2021-09-12 14:59:47 +0200 |
---|---|---|
committer | dzwdz | 2021-09-12 14:59:47 +0200 |
commit | 1bf901c803bff3393d0cc9dfe76fc9f025cecb1c (patch) | |
tree | 10f0c1c5d64496c3b300a4d691d640a7da73c772 /src/shared | |
parent | d7a91165004baf67b645b5604934ec89402d034b (diff) |
barebones `memflag()` implementation - letting the user allocate pages
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/flags.h | 5 | ||||
-rw-r--r-- | src/shared/syscalls.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/flags.h b/src/shared/flags.h new file mode 100644 index 0000000..9ab8d9d --- /dev/null +++ b/src/shared/flags.h @@ -0,0 +1,5 @@ +#pragma once + +enum { + MEMFLAG_PRESENT = 1 << 0, +}; diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h index a746ade..d96c8a7 100644 --- a/src/shared/syscalls.h +++ b/src/shared/syscalls.h @@ -22,6 +22,8 @@ enum { _SYSCALL_FS_CREATE, _SYSCALL_FS_WAIT, + + _SYSCALL_MEMFLAG, }; /** Kills the current process. @@ -53,3 +55,5 @@ int _syscall_close(handle_t); handle_t _syscall_fs_create(handle_t __user *back); int _syscall_fs_wait(handle_t back, char __user *buf, int __user *len); + +int _syscall_memflag(void __user *addr, size_t len, int flags); |