From 8ee57c885a72854d1884a886de4db538a8468e07 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 6 May 2022 14:41:58 +0200 Subject: syscalls: merge fork() and fs_fork2() --- src/shared/syscalls.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/shared/syscalls.h') 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 #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 -- cgit v1.2.3