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

Function lwp_ref_inc

components/lwp/lwp_pid.c:958–965  ·  view source on GitHub ↗

* @brief Increments the reference count of a lightweight process * * @param[in,out] lwp The lightweight process whose reference count is to be incremented * * @return int The updated reference count after incrementing * * @note the reference is not for synchronization, but for the release of resource. the synchronization is done through lwp & pid lock. */

Source from the content-addressed store, hash-verified

956 * @note the reference is not for synchronization, but for the release of resource. the synchronization is done through lwp & pid lock.
957 */
958int lwp_ref_inc(struct rt_lwp *lwp)
959{
960 int ref;
961 ref = rt_atomic_add(&lwp->ref, 1);
962 LOG_D("%s(%p(%s)): before %d", __func__, lwp, lwp->cmd, ref);
963
964 return ref;
965}
966
967/**
968 * @brief Decrements the reference count of a lightweight process (LWP)

Callers 7

lwp_pid_set_lwp_lockedFunction · 0.85
lwp_children_registerFunction · 0.85
lwp_from_pid_and_lockFunction · 0.85
sys_killFunction · 0.85
sys_thread_createFunction · 0.85
_sys_cloneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected