diff options
author | julian <julian@FreeBSD.org> | 2010-04-14 23:06:07 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2010-04-14 23:06:07 +0000 |
commit | e5e811b1e993cd1b6f7f86b9431fb2fee8cbe8bc (patch) | |
tree | f588b70bdefc57599e36aed4eb8146919ba0eb5b | |
parent | e2bd1cbb0ddd392b6fbcde0f81b44b59d52cece7 (diff) | |
download | FreeBSD-src-e5e811b1e993cd1b6f7f86b9431fb2fee8cbe8bc.zip FreeBSD-src-e5e811b1e993cd1b6f7f86b9431fb2fee8cbe8bc.tar.gz |
Move two copies of the same definition to a common include file.
MFC after: 3 weeks
-rw-r--r-- | sys/ddb/db_sym.c | 6 | ||||
-rw-r--r-- | sys/net/vnet.c | 9 | ||||
-rw-r--r-- | sys/net/vnet.h | 9 |
3 files changed, 9 insertions, 15 deletions
diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 99209a8..04af1eb 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -64,12 +64,6 @@ static boolean_t db_line_at_pc(c_db_sym_t, char **, int *, db_expr_t); static int db_cpu = -1; #ifdef VIMAGE -extern uintptr_t *__start_set_vnet; -extern uintptr_t *__stop_set_vnet; - -#define VNET_START (uintptr_t)&__start_set_vnet -#define VNET_STOP (uintptr_t)&__stop_set_vnet - static void *db_vnet = NULL; #endif diff --git a/sys/net/vnet.c b/sys/net/vnet.c index 1dac03a..8013f5e 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -154,15 +154,6 @@ struct vnet *vnet0; */ /* - * Location of the kernel's 'set_vnet' linker set. - */ -extern uintptr_t *__start_set_vnet; -extern uintptr_t *__stop_set_vnet; - -#define VNET_START (uintptr_t)&__start_set_vnet -#define VNET_STOP (uintptr_t)&__stop_set_vnet - -/* * Number of bytes of data in the 'set_vnet' linker set, and hence the total * size of all kernel virtualized global variables, and the malloc(9) type * that will be used to allocate it. diff --git a/sys/net/vnet.h b/sys/net/vnet.h index fb2cc39..4cdfdef 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -92,6 +92,15 @@ struct vnet { #include <sys/sx.h> /* + * Location of the kernel's 'set_vnet' linker set. + */ +extern uintptr_t *__start_set_vnet; +extern uintptr_t *__stop_set_vnet; + +#define VNET_START (uintptr_t)&__start_set_vnet +#define VNET_STOP (uintptr_t)&__stop_set_vnet + +/* * Functions to allocate and destroy virtual network stacks. */ struct vnet *vnet_alloc(void); |