From owner-cvs-src@FreeBSD.ORG Wed Jul 28 16:09:13 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 673A616A4CE; Wed, 28 Jul 2004 16:09:13 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1082F43D7B; Wed, 28 Jul 2004 16:09:13 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.10) with ESMTP id i6SG8rOF024600; Wed, 28 Jul 2004 09:08:53 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i6SG8rXE024599; Wed, 28 Jul 2004 09:08:53 -0700 Date: Wed, 28 Jul 2004 09:08:53 -0700 From: Brooks Davis To: Maxime Henrion Message-ID: <20040728160852.GA21481@Odin.AC.HMC.Edu> References: <200407280912.i6S9CsfA088910@repoman.freebsd.org> <20040728091920.GU82302@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <20040728091920.GU82302@elvis.mu.org> User-Agent: Mutt/1.5.4i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys _task.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2004 16:09:13 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 28, 2004 at 11:19:20AM +0200, Maxime Henrion wrote: > Maxime Henrion wrote: > > mux 2004-07-28 09:12:54 UTC > >=20 > > FreeBSD src repository > >=20 > > Modified files: > > sys/sys _task.h=20 > > Log: > > Remove (at least temporarily) the check that prevents us from includi= ng > > this file from userland. Since we export struct ifnet to userland, a= nd > > that struct ifnet now contains a struct task, userland needs to know > > what struct task looks like. > > =20 > > We need to consider having a pointer to a struct task here instead and > > forward declare struct task in the !_KERNEL case. >=20 > Or have a struct ifnet for kernel and a struct xifnet for userland, as we > do in other places. No, that won't work. There is no valid reason for userland applications to use struct ifnet. They only use it because the authors were lazy and access things like interface stats via kvm access to ifnet instead of via the generally adaquate sysctls. I'm seriously tempted to wrap if_var.h in something like, at least once we get our useland clean: #if defined(_KERNEL) || defined(IF_VAR_H_IS_NOT_A_VALID_USERLAND_INTERFACE) -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBB8+TXY6L6fI4GtQRAnZPAJ97onz3ZhINTFUc4wYiz30nUlTX+ACgwwmn ZTnA5PlqihqPA1HxIY/fnB4= =tWN6 -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw--