summaryrefslogtreecommitdiff
path: root/sys/net/vnet.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-11-22 19:32:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-11-22 19:32:54 +0000
commit3e288e623846fab91d923dd651b263d4696fd814 (patch)
treeddc86814ee8f35466e619bb63b8f15b41185074e /sys/net/vnet.h
parent42298a2e4a7825de8a516c970761ac6e6562b0d9 (diff)
downloadsrc-test2-3e288e623846fab91d923dd651b263d4696fd814.tar.gz
src-test2-3e288e623846fab91d923dd651b263d4696fd814.zip
Notes
Diffstat (limited to 'sys/net/vnet.h')
-rw-r--r--sys/net/vnet.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index beecd436d037..76123c7e4b88 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -95,7 +95,9 @@ struct vnet {
* Location of the kernel's 'set_vnet' linker set.
*/
extern uintptr_t *__start_set_vnet;
+__GLOBL(__start_set_vnet);
extern uintptr_t *__stop_set_vnet;
+__GLOBL(__stop_set_vnet);
#define VNET_START (uintptr_t)&__start_set_vnet
#define VNET_STOP (uintptr_t)&__stop_set_vnet
@@ -193,14 +195,9 @@ extern struct sx vnet_sxlock;
*/
#define VNET_NAME(n) vnet_entry_##n
#define VNET_DECLARE(t, n) extern t VNET_NAME(n)
-#define VNET_DEFINE(t, n) \
- __GLOBL("__start_" VNET_SETNAME); \
- __GLOBL("__stop_" VNET_SETNAME); \
- t VNET_NAME(n) __section(VNET_SETNAME) __used
-#define STATIC_VNET_DEFINE(t, n) \
- VNET_DEFINE(static t, n)
-#define _VNET_PTR(b, n) \
- (__typeof(VNET_NAME(n))*)((b) + (uintptr_t)&VNET_NAME(n))
+#define VNET_DEFINE(t, n) t VNET_NAME(n) __section(VNET_SETNAME) __used
+#define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \
+ ((b) + (uintptr_t)&VNET_NAME(n))
#define _VNET(b, n) (*_VNET_PTR(b, n))
@@ -374,11 +371,10 @@ do { \
* Versions of the VNET macros that compile to normal global variables and
* standard sysctl definitions.
*/
-#define VNET_NAME(n) n
-#define VNET_DECLARE(t, n) extern t n
-#define VNET_DEFINE(t, n) t n
-#define STATIC_VNET_DEFINE(t, n) static t n
-#define _VNET_PTR(b, n) &VNET_NAME(n)
+#define VNET_NAME(n) n
+#define VNET_DECLARE(t, n) extern t n
+#define VNET_DEFINE(t, n) t n
+#define _VNET_PTR(b, n) &VNET_NAME(n)
/*
* Virtualized global variable accessor macros.