Changeset View
Changeset View
Standalone View
Standalone View
sys/net/vnet.h
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | VNET_ASSERT(curvnet != NULL && (saved_vnet == NULL || \ | ||||
saved_vnet->vnet_magic_n == VNET_MAGIC_N), \ | saved_vnet->vnet_magic_n == VNET_MAGIC_N), \ | ||||
("CURVNET_RESTORE at %s:%d %s() curvnet=%p saved_vnet=%p", \ | ("CURVNET_RESTORE at %s:%d %s() curvnet=%p saved_vnet=%p", \ | ||||
__FILE__, __LINE__, __func__, curvnet, saved_vnet)); \ | __FILE__, __LINE__, __func__, curvnet, saved_vnet)); \ | ||||
curvnet = saved_vnet; | curvnet = saved_vnet; | ||||
#endif /* VNET_DEBUG */ | #endif /* VNET_DEBUG */ | ||||
extern struct vnet *vnet0; | extern struct vnet *vnet0; | ||||
#define IS_DEFAULT_VNET(arg) ((arg) == vnet0) | #define IS_DEFAULT_VNET(arg) ((arg) == vnet0) | ||||
#define VNET_IS_DYING(_vnet) \ | |||||
((_vnet)->vnet_shutdown && (_vnet)->vnet_state < SI_SUB_VNET_DONE) | |||||
#define CRED_TO_VNET(cr) (cr)->cr_prison->pr_vnet | #define CRED_TO_VNET(cr) (cr)->cr_prison->pr_vnet | ||||
#define TD_TO_VNET(td) CRED_TO_VNET((td)->td_ucred) | #define TD_TO_VNET(td) CRED_TO_VNET((td)->td_ucred) | ||||
#define P_TO_VNET(p) CRED_TO_VNET((p)->p_ucred) | #define P_TO_VNET(p) CRED_TO_VNET((p)->p_ucred) | ||||
/* | /* | ||||
* Global linked list of all virtual network stacks, along with read locks to | * Global linked list of all virtual network stacks, along with read locks to | ||||
* access it. If a caller may sleep while accessing the list, it must use | * access it. If a caller may sleep while accessing the list, it must use | ||||
▲ Show 20 Lines • Show All 207 Lines • Show Last 20 Lines |