summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2022-03-21 20:33:11 +0300
committerPaul E. McKenney <paulmck@kernel.org>2022-04-21 03:05:45 +0300
commit54abe3590fd350afb9cde2398dd3f4ba5bf6d167 (patch)
tree26d83647b917b79d4562bca6e45e2017c761b0af /tools/include
parent0e7b492943ec8cfdc7fffd9304d496315f781ea7 (diff)
downloadlinux-54abe3590fd350afb9cde2398dd3f4ba5bf6d167.tar.xz
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/include')
-rw-r--r--tools/include/nolibc/sys.h17
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);
*/