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

Function lim_fork

freebsd/kern/kern_resource.c:1218–1230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216}
1217
1218void
1219lim_fork(struct proc *p1, struct proc *p2)
1220{
1221
1222 PROC_LOCK_ASSERT(p1, MA_OWNED);
1223 PROC_LOCK_ASSERT(p2, MA_OWNED);
1224
1225 p2->p_limit = lim_hold(p1->p_limit);
1226 callout_init_mtx(&p2->p_limco, &p2->p_mtx, 0);
1227 if (p1->p_cpulimit != RLIM_INFINITY)
1228 callout_reset_sbt(&p2->p_limco, SBT_1S, 0,
1229 lim_cb, p2, C_PREL(1));
1230}
1231
1232void
1233lim_free(struct plimit *limp)

Callers 1

do_forkFunction · 0.85

Calls 1

lim_holdFunction · 0.70

Tested by

no test coverage detected