* @brief Delete an object from the user object list of a lightweight process * * @param[in,out] lwp The lightweight process structure whose object list needs updating * @param[in] object The object to be deleted from the LWP's object list * * @return rt_err_t Returns 0 on success, or -1 on failure */
| 546 | * @return rt_err_t Returns 0 on success, or -1 on failure |
| 547 | */ |
| 548 | rt_err_t lwp_user_object_delete(struct rt_lwp *lwp, rt_object_t object) |
| 549 | { |
| 550 | rt_err_t ret = -1; |
| 551 | |
| 552 | if (lwp && object) |
| 553 | { |
| 554 | struct lwp_avl_struct *node; |
| 555 | |
| 556 | lwp_user_object_lock(lwp); |
| 557 | node = lwp_avl_find((avl_key_t)object, lwp->object_root); |
| 558 | ret = _object_node_delete(lwp, node); |
| 559 | lwp_user_object_unlock(lwp); |
| 560 | } |
| 561 | return ret; |
| 562 | } |
| 563 | |
| 564 | /** |
| 565 | * @brief Clear all objects from the user object list of a lightweight process |
no test coverage detected