| 19 | #include <rtdbg.h> |
| 20 | |
| 21 | void 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 | |
| 33 | rt_processgroup_t lwp_pgrp_find_and_inc_ref(pid_t pgid) |
| 34 | { |
no test coverage detected