tools/nolibc/sys: add syscall definition for getppid()
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Mar 2022 17:33:11 +0000 (18:33 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 21 Apr 2022 00:05:45 +0000 (17:05 -0700)
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>
tools/include/nolibc/sys.h

index 2843786..4d4308d 100644 (file)
@@ -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);
  */