* Unshare a pwddesc structure. */
| 2299 | * Unshare a pwddesc structure. |
| 2300 | */ |
| 2301 | void |
| 2302 | pdunshare(struct thread *td) |
| 2303 | { |
| 2304 | struct pwddesc *pdp; |
| 2305 | struct proc *p; |
| 2306 | |
| 2307 | p = td->td_proc; |
| 2308 | /* Not shared. */ |
| 2309 | if (p->p_pd->pd_refcount == 1) |
| 2310 | return; |
| 2311 | |
| 2312 | pdp = pdcopy(p->p_pd); |
| 2313 | pdescfree(td); |
| 2314 | p->p_pd = pdp; |
| 2315 | } |
| 2316 | |
| 2317 | void |
| 2318 | fdinstall_remapped(struct thread *td, struct filedesc *fdp) |
no test coverage detected