* @brief Get the current light-weight process * * @return Pointer to the current light-weight process structure * RT_NULL if no process is associated with current thread * * @note This function retrieves the light-weight process associated with the * currently running thread. */
| 341 | * currently running thread. |
| 342 | */ |
| 343 | struct rt_lwp *lwp_self(void) |
| 344 | { |
| 345 | rt_thread_t tid; |
| 346 | |
| 347 | tid = rt_thread_self(); |
| 348 | if (tid) |
| 349 | { |
| 350 | return (struct rt_lwp *)tid->lwp; |
| 351 | } |
| 352 | |
| 353 | return RT_NULL; |
| 354 | } |
| 355 | |
| 356 | /** |
| 357 | * @brief Register a child process with its parent |
no test coverage detected