summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_proc.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-09-07 22:11:45 +0000
committerpeter <peter@FreeBSD.org>2002-09-07 22:11:45 +0000
commit93d34a10ac9870d06047ab290d563fd6c5b58a38 (patch)
tree15ef74ed3425dbe2382294dbf7e6e5c2c5c7b01e /sys/kern/kern_proc.c
parenta054ba3c90ce7be42618b16abc1df7dfc23913ad (diff)
downloadFreeBSD-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.
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r--sys/kern/kern_proc.c6
1 files changed, 6 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);
OpenPOWER on IntegriCloud