diff options
author | Warner Losh <imp@FreeBSD.org> | 2021-10-11 17:15:08 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2021-10-11 17:20:07 +0000 |
commit | 99eefc727eba667892bb9216410f3588345fe25f (patch) | |
tree | cf3b3d3b8a1dd50fb35540afa2271dc90ed0c7f7 | |
parent | 56ee5c551f89e767e931c55e063a20abd0c55346 (diff) | |
download | src-99eefc727eba667892bb9216410f3588345fe25f.tar.gz src-99eefc727eba667892bb9216410f3588345fe25f.zip |
sysctl.h: Less namespace pollution
Remove unused struct ctlname. It is unused. Move struct thread to
inside #if _KERNEL.
Sponsored by: Netflix
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D32457
-rw-r--r-- | sys/sys/sysctl.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 8178c7208f9b..71a34652ff44 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -42,7 +42,6 @@ #include <sys/queue.h> #endif -struct thread; /* * Definitions for sysctl call. The sysctl call uses a hierarchical name * for objects that can be examined or modified. The name is expressed as @@ -50,22 +49,16 @@ struct thread; * component depends on its place in the hierarchy. The top-level and kern * identifiers are defined here, and other identifiers are defined in the * respective subsystem header files. + * + * Each subsystem defined by sysctl defines a list of variables for that + * subsystem. Each name is either a node with further levels defined below it, + * or it is a leaf of some particular type given below. Each sysctl level + * defines a set of name/type pairs to be used by sysctl(8) in manipulating the + * subsystem. */ #define CTL_MAXNAME 24 /* largest number of components supported */ -/* - * Each subsystem defined by sysctl defines a list of variables - * for that subsystem. Each name is either a node with further - * levels defined below it, or it is a leaf of some particular - * type given below. Each sysctl level defines a set of name/type - * pairs to be used by sysctl(8) in manipulating the subsystem. - */ -struct ctlname { - char *ctl_name; /* subsystem name */ - int ctl_type; /* type of name */ -}; - #define CTLTYPE 0xf /* mask for the type */ #define CTLTYPE_NODE 1 /* name is a node */ #define CTLTYPE_INT 2 /* name describes an integer */ @@ -164,6 +157,7 @@ struct ctlname { * This describes the access space for a sysctl request. This is needed * so that we can use the interface from the kernel or from user-space. */ +struct thread; struct sysctl_req { struct thread *td; /* used for access checking */ int lock; /* wiring state */ |