aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2023-02-21 16:22:23 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2023-02-28 02:00:34 +0000
commit7b6d9cae9760152f0994d0825ee49cb5b5e204dc (patch)
tree5a18fbe1324f968b48fe2df38d777eb7a679e5f0
parent18936d3526f3090e4164b8155762bf5bd54038a8 (diff)
downloadsrc-7b6d9cae9760152f0994d0825ee49cb5b5e204dc.tar.gz
src-7b6d9cae9760152f0994d0825ee49cb5b5e204dc.zip
vnet: Make vnet_sys[un]init() static
These two functions are intended to be used only when allocating or destroying vnet instances. No functional change intended. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D37955 (cherry picked from commit fb9b76e05247e014f5faa554161028f6aa409bfd)
-rw-r--r--sys/net/vnet.c10
-rw-r--r--sys/net/vnet.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/net/vnet.c b/sys/net/vnet.c
index 2480fc8dd86c..b46ed9e270e0 100644
--- a/sys/net/vnet.c
+++ b/sys/net/vnet.c
@@ -220,6 +220,12 @@ SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry,
SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, return,
"int");
+/*
+ * Run per-vnet sysinits or sysuninits during vnet creation/destruction.
+ */
+static void vnet_sysinit(void);
+static void vnet_sysuninit(void);
+
#ifdef DDB
static void db_show_vnet_print_vs(struct vnet_sysinit *, int);
#endif
@@ -571,7 +577,7 @@ vnet_deregister_sysuninit(void *arg)
* vnet construction. The caller is responsible for ensuring the new vnet is
* the current vnet and that the vnet_sysinit_sxlock lock is locked.
*/
-void
+static void
vnet_sysinit(void)
{
struct vnet_sysinit *vs;
@@ -589,7 +595,7 @@ vnet_sysinit(void)
* vnet destruction. The caller is responsible for ensuring the dying vnet
* the current vnet and that the vnet_sysinit_sxlock lock is locked.
*/
-void
+static void
vnet_sysuninit(void)
{
struct vnet_sysinit *vs;
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index dcfcb5f99064..813ba2da921b 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -356,12 +356,6 @@ struct vnet_sysinit {
vnet_deregister_sysuninit, &ident ## _vnet_uninit)
/*
- * Run per-vnet sysinits or sysuninits during vnet creation/destruction.
- */
-void vnet_sysinit(void);
-void vnet_sysuninit(void);
-
-/*
* Interfaces for managing per-vnet constructors and destructors.
*/
void vnet_register_sysinit(void *arg);