Add the kernel internal variant of `getppid`, `uk_sys_getppid`. This
allows kernel internal code to call this system call's logic without
having the syscall shim wrapper logic intervene.
Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1583
waitpid
waitid
getpid
+uk_sys_getppid
getppid
uk_sys_gettid
gettid
}
pid_t uk_sys_gettid(void);
+pid_t uk_sys_getppid(void);
#if CONFIG_LIBUKSCHED
int uk_posix_process_create(struct uk_alloc *a,
}
/* PID of parent process */
-UK_SYSCALL_R_DEFINE(pid_t, getppid)
+pid_t uk_sys_getppid(void)
{
if (!pthread_self)
return -ENOTSUP;
return UNIKRAFT_TID;
}
-UK_SYSCALL_R_DEFINE(pid_t, getppid)
+pid_t uk_sys_getppid(void)
{
return UNIKRAFT_PPID;
}
{
return uk_sys_gettid();
}
+
+UK_SYSCALL_R_DEFINE(pid_t, getppid)
+{
+ return uk_sys_getppid();
+}