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

Function lwp_pgrp_dec_ref

components/lwp/lwp_pgrp.c:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include <rtdbg.h>
20
21void lwp_pgrp_dec_ref(rt_processgroup_t pgrp)
22{
23 if (rt_atomic_add(&pgrp->ref, -1) == 1)
24 {
25 rt_mutex_detach(&(pgrp->mutex));
26
27 /* clear self pgid */
28 pgrp->pgid = 0;
29 rt_free(pgrp);
30 }
31}
32
33rt_processgroup_t lwp_pgrp_find_and_inc_ref(pid_t pgid)
34{

Callers 3

lwp_pgrp_deleteFunction · 0.85
lwp_pgrp_moveFunction · 0.85

Calls 2

rt_mutex_detachFunction · 0.85
rt_freeFunction · 0.85

Tested by

no test coverage detected