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

Function _object_dup

components/lwp/lwp_pid.c:591–599  ·  view source on GitHub ↗

* @brief Callback function for duplicating objects in AVL tree traversal * * @param[in] node The AVL tree node containing the object to duplicate * @param[in,out] arg The destination lightweight process (cast to struct rt_lwp *) * @return int Always returns 0 to continue traversal * * @note This function is used as a callback during AVL tree traversal * to duplicate objects from one p

Source from the content-addressed store, hash-verified

589 * to duplicate objects from one process to another
590 */
591static int _object_dup(struct lwp_avl_struct *node, void *arg)
592{
593 rt_object_t object;
594 struct rt_lwp *dst_lwp = (struct rt_lwp *)arg;
595
596 object = (rt_object_t)node->avl_key;
597 lwp_user_object_add(dst_lwp, object);
598 return 0;
599}
600
601/**
602 * @brief Duplicate all objects from one lightweight process to another

Callers

nothing calls this directly

Calls 1

lwp_user_object_addFunction · 0.85

Tested by

no test coverage detected