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

Function lwp_getpid

components/lwp/lwp_pid.c:1145–1150  ·  view source on GitHub ↗

* @brief Get the process ID of the current lightweight process (LWP) * * @return pid_t Process ID of the current LWP */

Source from the content-addressed store, hash-verified

1143 * @return pid_t Process ID of the current LWP
1144 */
1145int lwp_getpid(void)
1146{
1147 rt_lwp_t lwp = lwp_self();
1148 return lwp ? lwp->pid : 1;
1149 /* return ((struct rt_lwp *)rt_thread_self()->lwp)->pid; */
1150}
1151
1152/**
1153 * @brief Update resource usage statistics from child to parent process

Callers 5

lwp_session_findFunction · 0.85
sys_getpidFunction · 0.85
lwp_pgrp_findFunction · 0.85
lwp_pgrp_createFunction · 0.85
lwp_pgrp_deleteFunction · 0.85

Calls 1

lwp_selfFunction · 0.85

Tested by

no test coverage detected