| 131 | } |
| 132 | |
| 133 | static int |
| 134 | reap_acquire(struct thread *td, struct proc *p) |
| 135 | { |
| 136 | |
| 137 | sx_assert(&proctree_lock, SX_XLOCKED); |
| 138 | if (p != curproc) |
| 139 | return (EPERM); |
| 140 | if ((p->p_treeflag & P_TREE_REAPER) != 0) |
| 141 | return (EBUSY); |
| 142 | p->p_treeflag |= P_TREE_REAPER; |
| 143 | /* |
| 144 | * We do not reattach existing children and the whole tree |
| 145 | * under them to us, since p->p_reaper already seen them. |
| 146 | */ |
| 147 | return (0); |
| 148 | } |
| 149 | |
| 150 | static int |
| 151 | reap_release(struct thread *td, struct proc *p) |
no outgoing calls
no test coverage detected