From owner-freebsd-arch Tue Nov 12 15:25:30 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C92E37B401 for ; Tue, 12 Nov 2002 15:25:29 -0800 (PST) Received: from marvin.bsdng.org (24-159-234-52.jvl.wi.charter.com [24.159.234.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A55243E4A for ; Tue, 12 Nov 2002 15:25:28 -0800 (PST) (envelope-from mkm@marvin.bsdng.org) Received: from marvin.bsdng.org (marvin [127.0.0.1]) by marvin.bsdng.org (8.12.6/8.12.5) with ESMTP id gACNNYet020468; Tue, 12 Nov 2002 17:23:35 -0600 (CST) (envelope-from mkm@marvin.bsdng.org) Received: (from mkm@localhost) by marvin.bsdng.org (8.12.6/8.12.6/Submit) id gACNNY7j020467; Tue, 12 Nov 2002 17:23:34 -0600 (CST) Date: Tue, 12 Nov 2002 17:23:34 -0600 From: Kyle Martin To: Kirk McKusick Cc: arch@freebsd.org Subject: Re: Shared-memory version of macros Message-ID: <20021112232334.GA20358@marvin.bsdng.org> References: <20021112172152.GC15329@marvin.bsdng.org> <200211122310.gACNA159039354@beastie.mckusick.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200211122310.gACNA159039354@beastie.mckusick.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Nov 12, 2002 at 03:10:01PM -0800, Kirk McKusick wrote: > > On Mon, Nov 11, 2002 at 02:32:04PM -0800, Kirk McKusick wrote: > > Historically /usr/include/sys was used to include files that > > provided headers that included interfaces between the kernel > > and userland. For example, describes that > > stat structure which is filled in by the kernel and used > > by userland applications. Since the queue macros do not > > describe any kernel/userland shared structures, they belong > > in /usr/include. They are much more like which > > describes purely userland structures like FILE *. However, > > we canot move from the /sys/sys directory as > > it is needed by the kernel (indeed was originally developed > > for the kernel) as there is another rule which says that > > the kernel headers need to be self contained (that is the > > kernel cannot depend on anything in /usr/include). So, there > > is the dilemma of duplicating the queue macros used in the > > kernel in a /usr/include file, or trying to avoid divergence > > by pulling in the kernel macros from /usr/include/sys. As > > for what userland applications should do, once > > exists, they should always use that file. > > > > perhaps "#include" could appear in > /usr/include/queue.h with some typical #ifdef > glue in > > > I am not sure what you mean by the above. The > file is already protected with #ifndef _SYS_QUEUE_H_ against > multiple inclusion. Did you have something else in mind? > The #ifdef I was referring to was _KERNEL, which is already there :) -- Kyle Martin mkm@ieee.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message