From 1caf181cd04090af77fd0aff8dd4b87df7a2ed66 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 3 Jul 2025 18:06:04 -0400 Subject: usr: libc: Add POSIX getpid() and getppid() Signed-off-by: Ian Moffett --- sys/include/sys/syscall.h | 2 ++ sys/kern/kern_syscall.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'sys') diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h index 08bd989..3650e7a 100644 --- a/sys/include/sys/syscall.h +++ b/sys/include/sys/syscall.h @@ -54,6 +54,8 @@ #define SYS_lseek 13 #define SYS_sleep 14 #define SYS_inject 15 +#define SYS_getpid 16 +#define SYS_getppid 17 #if defined(_KERNEL) /* Syscall return value and arg type */ diff --git a/sys/kern/kern_syscall.c b/sys/kern/kern_syscall.c index 292fa56..739dd7f 100644 --- a/sys/kern/kern_syscall.c +++ b/sys/kern/kern_syscall.c @@ -54,6 +54,8 @@ scret_t(*g_sctab[])(struct syscall_args *) = { sys_lseek, /* SYS_lseek */ sys_sleep, /* SYS_sleep */ sys_inject, /* SYS_inject */ + sys_getpid, /* SYS_getpid */ + sys_getppid /* SYS_getppid */ }; const size_t MAX_SYSCALLS = NELEM(g_sctab); -- cgit v1.2.3