* @brief Retrieves a lightweight process (LWP) by its PID while holding the lock * * @param[in] pid The process ID to look up * * @return struct rt_lwp* Pointer to the LWP structure if found, RT_NULL otherwise * * @note This function performs a raw lookup in the PID AVL tree while assuming * the caller already holds the necessary locks. It's a lower-level version * of lwp_from_
| 1022 | * of lwp_from_pid() that doesn't handle locking internally. |
| 1023 | */ |
| 1024 | struct rt_lwp* lwp_from_pid_raw_locked(pid_t pid) |
| 1025 | { |
| 1026 | struct lwp_avl_struct *p; |
| 1027 | struct rt_lwp *lwp = RT_NULL; |
| 1028 | |
| 1029 | p = lwp_avl_find(pid, lwp_pid_root); |
| 1030 | if (p) |
| 1031 | { |
| 1032 | lwp = (struct rt_lwp *)p->data; |
| 1033 | } |
| 1034 | |
| 1035 | return lwp; |
| 1036 | } |
| 1037 | |
| 1038 | /** |
| 1039 | * @brief Retrieves a lightweight process (LWP) by PID with lock handling |
no test coverage detected