sys/kern/kern_plimit.c
void
plimit_free(struct proc *p)
{
	struct plimit *limit;

	if ((limit = p->p_limit) != NULL) {
		p->p_limit = NULL;

		if (limit->p_refcnt == 1) {
			limit->p_refcnt = -999;
			kfree(limit, M_SUBPROC);
		} else {
			spin_lock(&limit->p_spin);
			if (--limit->p_refcnt == 0) {
				spin_unlock(&limit->p_spin);
				kfree(limit, M_SUBPROC);
			} else {
				spin_unlock(&limit->p_spin);
			}
		}
	}
}
/*
 * Destroy a process's plimit structure.
 *
 * MPSAFE
 */
Destroy a process's plimit structure.
MPSAFE
Destroy a process ' s plimit structure . MPSAFE
void
plimit_free(struct proc *p)
{
	struct plimit *limit;
	if ((limit = p->p_limit) != NULL) {
		p->p_limit = NULL;
		if (limit->p_refcnt == 1) {
			limit->p_refcnt = -999;
			kfree(limit, M_SUBPROC);
		} else {
			spin_lock(&limit->p_spin);
			if (--limit->p_refcnt == 0) {
				spin_unlock(&limit->p_spin);
				kfree(limit, M_SUBPROC);
			} else {
				spin_unlock(&limit->p_spin);
			}
		}
	}
}
void plimit_free ( struct proc * p ) { struct plimit * limit ; if ( ( limit = p -> p_limit ) != NULL ) { p -> p_limit = NULL ; if ( limit -> p_refcnt == 1 ) { limit -> p_refcnt = -999 ; kfree ( limit , M_SUBPROC ) ; } else { spin_lock ( & limit -> p_spin ) ; if ( -- limit -> p_refcnt == 0 ) { spin_unlock ( & limit -> p_spin ) ; kfree ( limit , M_SUBPROC ) ; } else { spin_unlock ( & limit -> p_spin ) ; } } } }
Destroy a process's plimit structure.
Destroy a process ' s plimit structure .