diff options
author | peter <peter@FreeBSD.org> | 2002-09-07 22:11:45 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-09-07 22:11:45 +0000 |
commit | 93d34a10ac9870d06047ab290d563fd6c5b58a38 (patch) | |
tree | 15ef74ed3425dbe2382294dbf7e6e5c2c5c7b01e | |
parent | a054ba3c90ce7be42618b16abc1df7dfc23913ad (diff) | |
download | FreeBSD-src-93d34a10ac9870d06047ab290d563fd6c5b58a38.zip FreeBSD-src-93d34a10ac9870d06047ab290d563fd6c5b58a38.tar.gz |
Make UAREA_PAGES and KSTACK_PAGES visible to userland via sysctl, like
PS_STRINGS and USRSTACK is. This is necessary in order to decode a.out
core dumps. kern_proc.c was already referring to both of these values
but was missing the #include "opt_kstack_pages.h". Make the sysctl
variables visible so that certain kld modules can see how their parent
kernel was configured.
-rw-r--r-- | sys/kern/kern_proc.c | 6 | ||||
-rw-r--r-- | sys/sys/systm.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index b4091e7..61be8de 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -35,6 +35,7 @@ */ #include "opt_ktrace.h" +#include "opt_kstack_pages.h" #include <sys/param.h> #include <sys/systm.h> @@ -101,6 +102,11 @@ static int active_procs; static int cached_procs; static int allocated_procs; +int kstack_pages = KSTACK_PAGES; +int uarea_pages = UAREA_PAGES; +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, uarea_pages, CTLFLAG_RD, &uarea_pages, 0, ""); + #define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); diff --git a/sys/sys/systm.h b/sys/sys/systm.h index e9d8f8f..e3b3a2a 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -54,6 +54,8 @@ extern int cold; /* nonzero if we are doing a cold boot */ extern const char *panicstr; /* panic message */ extern char version[]; /* system version */ extern char copyright[]; /* system copyright */ +extern int kstack_pages; /* number of kernel stack pages */ +extern int uarea_pages; /* number of user struct pages */ extern int nswap; /* size of swap space */ |