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

Function procdesc_reap

freebsd/kern/sys_procdesc.c:330–342  ·  view source on GitHub ↗

* When a process descriptor is reaped, perhaps as a result of close() or * pdwait4(), release the process's reference on the process descriptor. */

Source from the content-addressed store, hash-verified

328 * pdwait4(), release the process's reference on the process descriptor.
329 */
330void
331procdesc_reap(struct proc *p)
332{
333 struct procdesc *pd;
334
335 sx_assert(&proctree_lock, SA_XLOCKED);
336 KASSERT(p->p_procdesc != NULL, ("procdesc_reap: p_procdesc == NULL"));
337
338 pd = p->p_procdesc;
339 pd->pd_proc = NULL;
340 p->p_procdesc = NULL;
341 procdesc_free(pd);
342}
343
344/*
345 * procdesc_close() - last close on a process descriptor. If the process is

Callers 1

proc_reapFunction · 0.85

Calls 1

procdesc_freeFunction · 0.85

Tested by

no test coverage detected