* @brief Retrieves the thread object associated with a thread ID (TID) * * @param[in] tid The thread ID to look up * * @return rt_thread_t The associated thread object, or RT_NULL if not found */
| 169 | * @return rt_thread_t The associated thread object, or RT_NULL if not found |
| 170 | */ |
| 171 | rt_thread_t lwp_tid_get_thread_raw(int tid) |
| 172 | { |
| 173 | struct lwp_avl_struct *p; |
| 174 | rt_thread_t thread = RT_NULL; |
| 175 | |
| 176 | p = lwp_avl_find(tid, lwp_tid_root); |
| 177 | if (p) |
| 178 | { |
| 179 | thread = (rt_thread_t)p->data; |
| 180 | } |
| 181 | return thread; |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * @brief Retrieves a thread object by TID and increments its reference count |
no test coverage detected