MCPcopy Index your code
hub / github.com/RT-Thread/rt-thread / lwp_from_pid_locked

Function lwp_from_pid_locked

components/lwp/lwp_pid.c:1049–1054  ·  view source on GitHub ↗

* @brief Retrieves a lightweight process (LWP) by PID with lock handling * * @param[in] pid The process ID to look up (0 means current process) * * @return struct rt_lwp* Pointer to the LWP structure if found, current LWP if pid=0 * * @note This is a convenience wrapper that: * - If pid is non-zero, calls lwp_from_pid_raw_locked() * - If pid is zero, returns the current LWP via

Source from the content-addressed store, hash-verified

1047 * - If pid is zero, returns the current LWP via lwp_self()
1048 */
1049struct rt_lwp* lwp_from_pid_locked(pid_t pid)
1050{
1051 struct rt_lwp* lwp;
1052 lwp = pid ? lwp_from_pid_raw_locked(pid) : lwp_self();
1053 return lwp;
1054}
1055
1056/**
1057 * @brief Converts a lightweight process (LWP) to its PID

Callers 15

lwp_pid2nameFunction · 0.85
_verify_child_and_reapFunction · 0.85
_kill_eachFunction · 0.85
lwp_from_pid_and_lockFunction · 0.85
lwp_startupFunction · 0.85
sys_getsidFunction · 0.85
sys_getpriorityFunction · 0.85
sys_setpriorityFunction · 0.85
sys_sched_getaffinityFunction · 0.85
sys_setpgidFunction · 0.85
sys_getpgidFunction · 0.85

Calls 2

lwp_from_pid_raw_lockedFunction · 0.85
lwp_selfFunction · 0.85

Tested by

no test coverage detected