mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
vnet: add CURVNET_ASSERT_SET
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D34312
(cherry picked from commit 75cde1f872
)
This commit is contained in:
parent
9cfb9a34bf
commit
6766a47c02
1 changed files with 4 additions and 0 deletions
|
@ -236,6 +236,10 @@ void vnet_log_recursion(struct vnet *, const char *, int);
|
|||
curvnet = saved_vnet;
|
||||
#endif /* VNET_DEBUG */
|
||||
|
||||
#define CURVNET_ASSERT_SET() \
|
||||
VNET_ASSERT(curvnet != NULL, ("vnet is not set at %s:%d %s()", \
|
||||
__FILE__, __LINE__, __func__))
|
||||
|
||||
extern struct vnet *vnet0;
|
||||
#define IS_DEFAULT_VNET(arg) ((arg) == vnet0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue