Lines Matching refs:lim

677 lim_copy(struct plimit *lim)  in lim_copy()  argument
689 mutex_enter(&lim->pl_lock); in lim_copy()
690 memcpy(newlim->pl_rlimit, lim->pl_rlimit, in lim_copy()
699 if (lim->pl_corename == defcorename) { in lim_copy()
704 len = lim->pl_cnlen; in lim_copy()
708 memcpy(corename, lim->pl_corename, len); in lim_copy()
712 mutex_exit(&lim->pl_lock); in lim_copy()
718 mutex_enter(&lim->pl_lock); in lim_copy()
720 mutex_exit(&lim->pl_lock); in lim_copy()
729 lim_addref(struct plimit *lim) in lim_addref() argument
731 atomic_inc_uint(&lim->pl_refcnt); in lim_addref()
740 struct plimit *lim = p->p_limit, *newlim; in lim_privatise() local
742 if (lim->pl_writeable) { in lim_privatise()
746 newlim = lim_copy(lim); in lim_privatise()
769 struct plimit *lim; in lim_setcorename() local
774 lim = p->p_limit; in lim_setcorename()
776 mutex_enter(&lim->pl_lock); in lim_setcorename()
777 oname = lim->pl_corename; in lim_setcorename()
778 olen = lim->pl_cnlen; in lim_setcorename()
779 lim->pl_corename = name; in lim_setcorename()
780 lim->pl_cnlen = len; in lim_setcorename()
781 mutex_exit(&lim->pl_lock); in lim_setcorename()
789 lim_free(struct plimit *lim) in lim_free() argument
795 if (atomic_dec_uint_nv(&lim->pl_refcnt) > 0) { in lim_free()
799 if (lim->pl_corename != defcorename) { in lim_free()
800 kmem_free(lim->pl_corename, lim->pl_cnlen); in lim_free()
802 sv_lim = lim->pl_sv_limit; in lim_free()
803 mutex_destroy(&lim->pl_lock); in lim_free()
804 kmem_free(lim, sizeof(*lim)); in lim_free()
805 } while ((lim = sv_lim) != NULL); in lim_free()
913 struct plimit *lim; in sysctl_proc_corename() local
946 lim = p->p_limit; in sysctl_proc_corename()
947 mutex_enter(&lim->pl_lock); in sysctl_proc_corename()
948 strlcpy(cnbuf, lim->pl_corename, MAXPATHLEN); in sysctl_proc_corename()
949 mutex_exit(&lim->pl_lock); in sysctl_proc_corename()