From 6b3a7b1ce72b894cfa847ca675e90b23dd41737f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 5 Jul 2020 19:37:43 +0200 Subject: [PATCH] Base: Add man pages for gettid(), getpid(), and getppid() --- Base/usr/share/man/man2/getpid.md | 28 ++++++++++++++++++++++++++++ Base/usr/share/man/man2/getppid.md | 28 ++++++++++++++++++++++++++++ Base/usr/share/man/man2/gettid.md | 28 ++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 Base/usr/share/man/man2/getpid.md create mode 100644 Base/usr/share/man/man2/getppid.md create mode 100644 Base/usr/share/man/man2/gettid.md diff --git a/Base/usr/share/man/man2/getpid.md b/Base/usr/share/man/man2/getpid.md new file mode 100644 index 0000000000..38ce073022 --- /dev/null +++ b/Base/usr/share/man/man2/getpid.md @@ -0,0 +1,28 @@ +## Name + +getpid - get current process ID + +## Synopsis + +```**c++ +#include + +pid_t getpid(); +``` + +## Description + +Returns the PID (process ID) of the calling process. + +## Return value + +The process ID of the calling process. + +## Errors + +None. + +## See also + +* [`getppid`(2)](getppid.md) +* [`gettid`(2)](gettid.md) diff --git a/Base/usr/share/man/man2/getppid.md b/Base/usr/share/man/man2/getppid.md new file mode 100644 index 0000000000..105208c407 --- /dev/null +++ b/Base/usr/share/man/man2/getppid.md @@ -0,0 +1,28 @@ +## Name + +getppid - get current process's parent process ID + +## Synopsis + +```**c++ +#include + +pid_t getppid(); +``` + +## Description + +Returns the PID (process ID) of the parent of the calling process. + +## Return value + +The process ID of the parent of the calling process. + +## Errors + +None. + +## See also + +* [`getpid`(2)](getpid.md) +* [`gettid`(2)](gettid.md) diff --git a/Base/usr/share/man/man2/gettid.md b/Base/usr/share/man/man2/gettid.md new file mode 100644 index 0000000000..ed97e509af --- /dev/null +++ b/Base/usr/share/man/man2/gettid.md @@ -0,0 +1,28 @@ +## Name + +gettid - get current thread ID + +## Synopsis + +```**c++ +#include + +int gettid(); +``` + +## Description + +Returns the TID (thread ID) of the calling thread. The first thread in a process has the same TID and PID. Subsequently spawned threads will have unique thread ID's, but all share the same PID. + +## Return value + +The thread ID of the calling thread. + +## Error + +None. + +## See also + +* [`getpid`(2)](getpid.md) +* [`getppid`(2)](getppid.md)