From nobody Mon Oct 11 17:24:18 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D49E017E7C3B; Mon, 11 Oct 2021 17:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HSlyp3F5Cz4fmf; Mon, 11 Oct 2021 17:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E42724C7D; Mon, 11 Oct 2021 17:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19BHOIok063489; Mon, 11 Oct 2021 17:24:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19BHOIRh063488; Mon, 11 Oct 2021 17:24:18 GMT (envelope-from git) Date: Mon, 11 Oct 2021 17:24:18 GMT Message-Id: <202110111724.19BHOIRh063488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 99eefc727eba - main - sysctl.h: Less namespace pollution List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99eefc727eba667892bb9216410f3588345fe25f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=99eefc727eba667892bb9216410f3588345fe25f commit 99eefc727eba667892bb9216410f3588345fe25f Author: Warner Losh AuthorDate: 2021-10-11 17:15:08 +0000 Commit: Warner Losh CommitDate: 2021-10-11 17:20:07 +0000 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 --- sys/sys/sysctl.h | 20 +++++++------------- 1 file 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 #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 */