Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/resourcevar.h
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
* Locking guide: | * Locking guide: | ||||
* (a) Constant from inception | * (a) Constant from inception | ||||
* (b) Lockless, updated using atomics | * (b) Lockless, updated using atomics | ||||
* (c) Locked by global uihashtbl_lock | * (c) Locked by global uihashtbl_lock | ||||
* (d) Locked by the ui_vmsize_mtx | * (d) Locked by the ui_vmsize_mtx | ||||
*/ | */ | ||||
struct uidinfo { | struct uidinfo { | ||||
LIST_ENTRY(uidinfo) ui_hash; /* (c) hash chain of uidinfos */ | LIST_ENTRY(uidinfo) ui_hash; /* (c) hash chain of uidinfos */ | ||||
struct mtx ui_vmsize_mtx; | |||||
vm_ooffset_t ui_vmsize; /* (d) swap reservation by uid */ | vm_ooffset_t ui_vmsize; /* (d) swap reservation by uid */ | ||||
long ui_sbsize; /* (b) socket buffer space consumed */ | long ui_sbsize; /* (b) socket buffer space consumed */ | ||||
long ui_proccnt; /* (b) number of processes */ | long ui_proccnt; /* (b) number of processes */ | ||||
long ui_ptscnt; /* (b) number of pseudo-terminals */ | long ui_ptscnt; /* (b) number of pseudo-terminals */ | ||||
long ui_kqcnt; /* (b) number of kqueues */ | long ui_kqcnt; /* (b) number of kqueues */ | ||||
long ui_umtxcnt; /* (b) number of shared umtxs */ | long ui_umtxcnt; /* (b) number of shared umtxs */ | ||||
uid_t ui_uid; /* (a) uid */ | uid_t ui_uid; /* (a) uid */ | ||||
u_int ui_ref; /* (b) reference count */ | u_int ui_ref; /* (b) reference count */ | ||||
#ifdef RACCT | #ifdef RACCT | ||||
struct racct *ui_racct; /* (a) resource accounting */ | struct racct *ui_racct; /* (a) resource accounting */ | ||||
#endif | #endif | ||||
}; | }; | ||||
#define UIDINFO_VMSIZE_LOCK(ui) mtx_lock(&((ui)->ui_vmsize_mtx)) | |||||
#define UIDINFO_VMSIZE_UNLOCK(ui) mtx_unlock(&((ui)->ui_vmsize_mtx)) | |||||
struct proc; | struct proc; | ||||
struct rusage_ext; | struct rusage_ext; | ||||
struct thread; | struct thread; | ||||
void addupc_intr(struct thread *td, uintfptr_t pc, u_int ticks); | void addupc_intr(struct thread *td, uintfptr_t pc, u_int ticks); | ||||
void addupc_task(struct thread *td, uintfptr_t pc, u_int ticks); | void addupc_task(struct thread *td, uintfptr_t pc, u_int ticks); | ||||
void calccru(struct proc *p, struct timeval *up, struct timeval *sp); | void calccru(struct proc *p, struct timeval *up, struct timeval *sp); | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |