| 167 | } |
| 168 | |
| 169 | void |
| 170 | proc_clear_orphan(struct proc *p) |
| 171 | { |
| 172 | struct proc *p1; |
| 173 | |
| 174 | sx_assert(&proctree_lock, SA_XLOCKED); |
| 175 | if ((p->p_treeflag & P_TREE_ORPHANED) == 0) |
| 176 | return; |
| 177 | if ((p->p_treeflag & P_TREE_FIRST_ORPHAN) != 0) { |
| 178 | p1 = LIST_NEXT(p, p_orphan); |
| 179 | if (p1 != NULL) |
| 180 | p1->p_treeflag |= P_TREE_FIRST_ORPHAN; |
| 181 | p->p_treeflag &= ~P_TREE_FIRST_ORPHAN; |
| 182 | } |
| 183 | LIST_REMOVE(p, p_orphan); |
| 184 | p->p_treeflag &= ~P_TREE_ORPHANED; |
| 185 | } |
| 186 | |
| 187 | /* |
| 188 | * exit -- death of process. |
no outgoing calls
no test coverage detected