Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/racct.h
Show All 31 Lines | |||||
/* | /* | ||||
* Resource accounting. | * Resource accounting. | ||||
*/ | */ | ||||
#ifndef _RACCT_H_ | #ifndef _RACCT_H_ | ||||
#define _RACCT_H_ | #define _RACCT_H_ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
#include <sys/stdint.h> | |||||
#include <sys/queue.h> | |||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/queue.h> | |||||
#include <sys/stdint.h> | |||||
#include <sys/sysctl.h> | |||||
struct proc; | struct proc; | ||||
struct rctl_rule_link; | struct rctl_rule_link; | ||||
struct ucred; | struct ucred; | ||||
/* | /* | ||||
* Resources. | * Resources. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | |||||
* subject, such as process or jail. | * subject, such as process or jail. | ||||
* | * | ||||
* This structure must be filled with zeroes initially. | * This structure must be filled with zeroes initially. | ||||
*/ | */ | ||||
struct racct { | struct racct { | ||||
int64_t r_resources[RACCT_MAX + 1]; | int64_t r_resources[RACCT_MAX + 1]; | ||||
LIST_HEAD(, rctl_rule_link) r_rule_links; | LIST_HEAD(, rctl_rule_link) r_rule_links; | ||||
}; | }; | ||||
SYSCTL_DECL(_kern_racct); | |||||
#ifdef RACCT | #ifdef RACCT | ||||
int racct_add(struct proc *p, int resource, uint64_t amount); | int racct_add(struct proc *p, int resource, uint64_t amount); | ||||
void racct_add_cred(struct ucred *cred, int resource, uint64_t amount); | void racct_add_cred(struct ucred *cred, int resource, uint64_t amount); | ||||
void racct_add_force(struct proc *p, int resource, uint64_t amount); | void racct_add_force(struct proc *p, int resource, uint64_t amount); | ||||
int racct_set(struct proc *p, int resource, uint64_t amount); | int racct_set(struct proc *p, int resource, uint64_t amount); | ||||
void racct_set_force(struct proc *p, int resource, uint64_t amount); | void racct_set_force(struct proc *p, int resource, uint64_t amount); | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |