Lines Matching full:limit
75 * Serializes resource limit updates.
248 struct plimit *limit;
265 /* Get exclusive write access to the limit structure. */
266 limit = lim_write_begin();
267 alimp = &limit->pl_rlimit[which];
299 * "rlim_cur" bytes accessible. If stack limit is going
340 lim_write_commit(limit);
353 struct plimit *limit;
359 limit = lim_read_enter();
360 alimp = limit->pl_rlimit[SCARG(uap, which)];
361 lim_read_leave(limit);
668 * and copy when a limit is changed.
693 struct plimit *limit;
696 limit = parent->ps_limit;
697 refcnt_take(&limit->pl_refcnt);
700 child->ps_limit = limit;
702 if (limit->pl_rlimit[RLIMIT_CPU].rlim_cur != RLIM_INFINITY)
707 * Return an exclusive write reference to the process' resource limit structure.
715 struct plimit *limit;
729 limit = p->p_p->ps_limit;
730 if (P_HASSIBLING(p) || refcnt_shared(&limit->pl_refcnt))
731 limit = lim_copy(limit);
733 return (limit);
741 lim_write_commit(struct plimit *limit)
748 if (limit != p->p_p->ps_limit) {
751 p->p_p->ps_limit = limit;
759 * Begin read access to the process' resource limit structure.
767 struct plimit *limit;
779 limit = p->p_limit;
780 if (limit != pr->ps_limit) {
782 limit = pr->ps_limit;
783 refcnt_take(&limit->pl_refcnt);
787 p->p_limit = limit;
789 KASSERT(limit != NULL);
790 return (limit);
794 * Get the value of the resource limit in given process.