diff options
author | Willy Tarreau | 2022-03-21 18:33:11 +0100 |
---|---|---|
committer | Paul E. McKenney | 2022-04-20 17:05:45 -0700 |
commit | 54abe3590fd350afb9cde2398dd3f4ba5bf6d167 (patch) | |
tree | 26d83647b917b79d4562bca6e45e2017c761b0af /tools | |
parent | 0e7b492943ec8cfdc7fffd9304d496315f781ea7 (diff) |
tools/nolibc/sys: add syscall definition for getppid()
This is essentially for completeness as it's not the most often used
in regtests.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/include/nolibc/sys.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 28437863c63f..4d4308d5d111 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -465,6 +465,23 @@ pid_t getpid(void) /* + * pid_t getppid(void); + */ + +static __attribute__((unused)) +pid_t sys_getppid(void) +{ + return my_syscall0(__NR_getppid); +} + +static __attribute__((unused)) +pid_t getppid(void) +{ + return sys_getppid(); +} + + +/* * pid_t gettid(void); */ |