Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/jail.h
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* Lock key: | * Lock key: | ||||
* (a) allprison_lock | * (a) allprison_lock | ||||
* (c) set only during creation before the structure is shared, no mutex | * (c) set only during creation before the structure is shared, no mutex | ||||
* required to read | * required to read | ||||
* (m) locked by pr_mtx | * (m) locked by pr_mtx | ||||
* (p) locked by pr_mtx, and also at least shared allprison_lock required | * (p) locked by pr_mtx, and also at least shared allprison_lock required | ||||
* to update | * to update | ||||
* (r) atomic via refcount(9), pr_mtx required to decrement to zero | * (r) atomic via refcount(9), pr_mtx and allprison_lock required to | ||||
* decrement to zero | |||||
*/ | */ | ||||
struct prison { | struct prison { | ||||
TAILQ_ENTRY(prison) pr_list; /* (a) all prisons */ | TAILQ_ENTRY(prison) pr_list; /* (a) all prisons */ | ||||
int pr_id; /* (c) prison id */ | int pr_id; /* (c) prison id */ | ||||
volatile u_int pr_ref; /* (r) refcount */ | volatile u_int pr_ref; /* (r) refcount */ | ||||
volatile u_int pr_uref; /* (r) user (alive) refcount */ | volatile u_int pr_uref; /* (r) user (alive) refcount */ | ||||
unsigned pr_flags; /* (p) PR_* flags */ | unsigned pr_flags; /* (p) PR_* flags */ | ||||
LIST_HEAD(, prison) pr_children; /* (a) list of child jails */ | LIST_HEAD(, prison) pr_children; /* (a) list of child jails */ | ||||
▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines |