From b61c07af798557eff4333716c917c99a4f0c13c6 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 13 Oct 2025 16:14:02 -0400 Subject: kern: proc: Add initial waitpid() syscall Signed-off-by: Ian Moffett --- src/sys/include/compat/unix/syscall.h | 3 ++- src/sys/include/sys/proc.h | 5 +++++ src/sys/include/sys/syscall.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/sys/include') diff --git a/src/sys/include/compat/unix/syscall.h b/src/sys/include/compat/unix/syscall.h index 7a612c3..13bd617 100644 --- a/src/sys/include/compat/unix/syscall.h +++ b/src/sys/include/compat/unix/syscall.h @@ -74,7 +74,8 @@ scret_t(*g_unix_sctab[])(struct syscall_args *) = { [SYS_open] = sys_open, [SYS_muxtap] = sys_muxtap, [SYS_getargv] = sys_getargv, - [SYS_reboot] = sys_reboot + [SYS_reboot] = sys_reboot, + [SYS_waitpid] = sys_waitpid }; #endif /* !_NEED_UNIX_SCTAB */ diff --git a/src/sys/include/sys/proc.h b/src/sys/include/sys/proc.h index bb34066..618ddf3 100644 --- a/src/sys/include/sys/proc.h +++ b/src/sys/include/sys/proc.h @@ -263,5 +263,10 @@ scret_t sys_spawn(struct syscall_args *scargs); */ scret_t sys_getargv(struct syscall_args *scargs); +/* + * Wait for a child to complete + */ +scret_t sys_waitpid(struct syscall_args *scargs); + #endif /* !_KERNEL */ #endif /* !_SYS_PROC_H_ */ diff --git a/src/sys/include/sys/syscall.h b/src/sys/include/sys/syscall.h index 9616aed..ac03055 100644 --- a/src/sys/include/sys/syscall.h +++ b/src/sys/include/sys/syscall.h @@ -54,6 +54,7 @@ #define SYS_muxtap 0x09 /* mux an I/O tap */ #define SYS_getargv 0x0A /* get process argv */ #define SYS_reboot 0x0B /* reboot the system */ +#define SYS_waitpid 0x0C /* wait for child to exit */ typedef __ssize_t scret_t; typedef __ssize_t scarg_t; -- cgit v1.2.3