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

Function lwp_tid_get_thread_raw

components/lwp/lwp_tid.c:171–182  ·  view source on GitHub ↗

* @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 */

Source from the content-addressed store, hash-verified

169 * @return rt_thread_t The associated thread object, or RT_NULL if not found
170 */
171rt_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

Callers 1

Calls 1

lwp_avl_findFunction · 0.85

Tested by

no test coverage detected