projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e7b492
)
tools/nolibc/sys: add syscall definition for getppid()
author
Willy Tarreau
<w@1wt.eu>
Mon, 21 Mar 2022 17:33:11 +0000
(18:33 +0100)
committer
Paul 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
patch
|
blob
|
history
diff --git
a/tools/include/nolibc/sys.h
b/tools/include/nolibc/sys.h
index 28437863c63ff267a2d766d2a1df1462bc742e54..4d4308d5d11167808fe51b717d8f05d105178eb5 100644
(file)
--- a/
tools/include/nolibc/sys.h
+++ b/
tools/include/nolibc/sys.h
@@
-464,6
+464,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);
*/