MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / sys_getpid

Function sys_getpid

components/lwp/lwp_syscall.c:1500–1503  ·  view source on GitHub ↗

* @brief Retrieves the process ID of the calling process. * * This system call returns the process ID (PID) of the calling process. The PID is a * unique identifier assigned by the operating system to each running process. It can * be used to refer to or manipulate the process in subsequent system calls. * * @return The PID of the calling process. On failure, returns `-1` and sets `errno` *

Source from the content-addressed store, hash-verified

1498 * @see getppid(), getuid(), getgid()
1499 */
1500sysret_t sys_getpid(void)
1501{
1502 return lwp_getpid();
1503}
1504
1505/**
1506 * @brief Retrieves the parent process ID of the calling process.

Callers

nothing calls this directly

Calls 1

lwp_getpidFunction · 0.85

Tested by

no test coverage detected