Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Jan 1997 22:05:35 +0100
From:      Poul-Henning Kamp <phk@critter.dk.tfs.com>
To:        Garrett Wollman <wollman@lcs.mit.edu>
Cc:        current@freebsd.org
Subject:   Re: <sys/kernel.h> and MAKE_SET 
Message-ID:  <13838.852152735@critter.dk.tfs.com>
In-Reply-To: Your message of "Wed, 01 Jan 1997 14:57:14 EST." <9701011957.AA19705@halloran-eldar.lcs.mit.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>>> Isn't it wrong to have MAKE_SET() in <sys/kernel.h> ?  What if you want
>>>> to use it from userland ?
>>> 
>>> Then you write `asm(".stabs blah,blah,blah,blah")'.
>
>> Yeah, right after `goto L1020;' :-(
>
>> We're not here to reinvent the wheel all the time.
>
>I would just as soon see linker sets not used in user-land code, so as
>to not diminish its value to other people who are attempting to do
>things with it that don't involve using our linker/build environment.
>One of the nice things about most of the user-land code as it stands
>is that I can take most of the utilities together with some useful
>glue from the C library and have things work on other platforms.

I don't care much about this, but it prevents me from testing my
kernel code in a userland harness :-(

I'm going to stick in this patch:

Index: kernel.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/kernel.h,v
retrieving revision 1.22
diff -u -r1.22 kernel.h
--- kernel.h	1996/09/20 14:36:14	1.22
+++ kernel.h	1997/01/01 13:25:20
@@ -47,6 +47,7 @@
 
 /* Global variables for the kernel. */
 
+#ifdef KERNEL
 /* 1.1 */
 extern long hostid;
 extern char hostname[MAXHOSTNAMELEN];
@@ -72,6 +73,7 @@
 extern int tickdelta;
 extern long timedelta;
 
+#endif /* KERNEL */
 /*
  * The following macros are used to declare global sets of objects, which
  * are collected by the linker into a `struct linker_set' as defined below.

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@tfs.com           TRW Financial Systems, Inc.
Power and ignorance is a disgusting cocktail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13838.852152735>