FreeBSD/sys/kern/kern_rctl.c
/*
 * Return the amount of resource that can be allocated by 'p' before
 * hitting 'rule'.
 */
Return the amount of resource that can be allocated by 'p' before
hitting 'rule'.
Return the amount of resource that can be allocated by ' p ' before hitting ' rule ' .
static int64_t
rctl_available_resource(const struct proc *p, const struct rctl_rule *rule)
{
	const struct racct *racct;
	int64_t available;
	ASSERT_RACCT_ENABLED();
	RACCT_LOCK_ASSERT();
	racct = rctl_proc_rule_to_racct(p, rule);
	available = rule->rr_amount - racct->r_resources[rule->rr_resource];
	return (available);
}
static int64_t rctl_available_resource ( const struct proc * p , const struct rctl_rule * rule ) { const struct racct * racct ; int64_t available ; ASSERT_RACCT_ENABLED ( ) ; RACCT_LOCK_ASSERT ( ) ; racct = rctl_proc_rule_to_racct ( p , rule ) ; available = rule -> rr_amount - racct -> r_resources [ rule -> rr_resource ] ; return ( available ) ; }
Return the amount of resource that can be allocated by 'p' before
 hitting 'rule'.
Return the amount of resource that can be allocated by ' p ' before hitting ' rule ' .