diff options
author | dzwdz | 2022-05-06 14:41:58 +0200 |
---|---|---|
committer | dzwdz | 2022-05-06 14:41:58 +0200 |
commit | 8ee57c885a72854d1884a886de4db538a8468e07 (patch) | |
tree | 9c9f2eea8d7667ce7ed45dd71b6bbde40ce93f7e /src/shared | |
parent | 53d21d1ccb75004d0085efedd688b695707a3138 (diff) |
syscalls: merge fork() and fs_fork2()
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/syscalls.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h index d986d11..8dee783 100644 --- a/src/shared/syscalls.h +++ b/src/shared/syscalls.h @@ -3,6 +3,7 @@ #include <stddef.h> #define FORK_NOREAP 1 +#define FORK_NEWFS 2 enum { // idc about stable syscall numbers just yet @@ -38,9 +39,13 @@ int _syscall_await(void); /** Creates a copy of the current process, and executes it. * All user memory pages get copied too. + * + * @param flags FORK_NOREAP, FORK_NEWFS + * @param fs_front requires FORK_NEWFS. the front handle to the new fs is put there + * * @return 0 in the child, a meaningless positive value in the parent. */ -int _syscall_fork(int flags); +int _syscall_fork(int flags, handle_t __user *fs_front); handle_t _syscall_open(const char __user *path, int len); @@ -49,8 +54,6 @@ int _syscall_read(handle_t h, void __user *buf, size_t len, int offset); int _syscall_write(handle_t h, const void __user *buf, size_t len, int offset); int _syscall_close(handle_t h); -handle_t _syscall_fs_fork2(void); - struct fs_wait_response { enum vfs_operation op; size_t len; // how much was put in *buf |