Changeset View
Changeset View
Standalone View
Standalone View
sys/jail.h
Show First 20 Lines • Show All 335 Lines • ▼ Show 20 Lines | : ((prison_unlock(cpr), \ | ||||
(descend) = LIST_NEXT(cpr, pr_sibling) != NULL) \ | (descend) = LIST_NEXT(cpr, pr_sibling) != NULL) \ | ||||
? LIST_NEXT(cpr, pr_sibling) \ | ? LIST_NEXT(cpr, pr_sibling) \ | ||||
: (level--, (cpr)->pr_parent)))));) \ | : (level--, (cpr)->pr_parent)))));) \ | ||||
if ((descend) ? (prison_lock(cpr), 0) : 1) \ | if ((descend) ? (prison_lock(cpr), 0) : 1) \ | ||||
; \ | ; \ | ||||
else | else | ||||
/* | /* | ||||
* Traverse a prison's descendants, visiting both preorder and postorder. | |||||
*/ | |||||
#define FOREACH_PRISON_DESCENDANT_PRE_POST(ppr, cpr, descend) \ | |||||
for ((cpr) = (ppr), (descend) = 1; \ | |||||
((cpr) = (descend) \ | |||||
? ((descend) = !LIST_EMPTY(&(cpr)->pr_children)) \ | |||||
? LIST_FIRST(&(cpr)->pr_children) \ | |||||
: (cpr) \ | |||||
: ((descend) = LIST_NEXT(cpr, pr_sibling) != NULL) \ | |||||
? LIST_NEXT(cpr, pr_sibling) \ | |||||
: cpr->pr_parent) != (ppr);) | |||||
/* | |||||
* Attributes of the physical system, and the root of the jail tree. | * Attributes of the physical system, and the root of the jail tree. | ||||
*/ | */ | ||||
extern struct prison prison0; | extern struct prison prison0; | ||||
TAILQ_HEAD(prisonlist, prison); | TAILQ_HEAD(prisonlist, prison); | ||||
extern struct prisonlist allprison; | extern struct prisonlist allprison; | ||||
extern struct sx allprison_lock; | extern struct sx allprison_lock; | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |