summaryrefslogtreecommitdiffstats
path: root/tools/include/nolibc/sys.h
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2022-03-21 18:33:11 +0100
committerPaul E. McKenney <paulmck@kernel.org>2022-04-21 02:05:45 +0200
commit54abe3590fd350afb9cde2398dd3f4ba5bf6d167 (patch)
tree26d83647b917b79d4562bca6e45e2017c761b0af /tools/include/nolibc/sys.h
parenttools/nolibc/string: add strcmp() and strncmp() (diff)
downloadlinux-54abe3590fd350afb9cde2398dd3f4ba5bf6d167.tar.xz
linux-54abe3590fd350afb9cde2398dd3f4ba5bf6d167.zip
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/nolibc/sys.h')
-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);
*/