MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pdunshare

Function pdunshare

freebsd/kern/kern_descrip.c:2301–2315  ·  view source on GitHub ↗

* Unshare a pwddesc structure. */

Source from the content-addressed store, hash-verified

2299 * Unshare a pwddesc structure.
2300 */
2301void
2302pdunshare(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
2317void
2318fdinstall_remapped(struct thread *td, struct filedesc *fdp)

Callers 2

fork_norfprocFunction · 0.85
do_execveFunction · 0.85

Calls 2

pdcopyFunction · 0.85
pdescfreeFunction · 0.85

Tested by

no test coverage detected