summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_proc.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2012-04-10 15:50:52 +0000
committerguenther <guenther@openbsd.org>2012-04-10 15:50:52 +0000
commite6fd2ff84860d099ea5ae17d34f29629f598ebc7 (patch)
tree583b593e87386d627543d084f7eab708e15180d9 /sys/kern/kern_proc.c
parentBuild with -O1 on vax for now, pcre_exec can not build with -O2. (diff)
downloadwireguard-openbsd-e6fd2ff84860d099ea5ae17d34f29629f598ebc7.tar.xz
wireguard-openbsd-e6fd2ff84860d099ea5ae17d34f29629f598ebc7.zip
Make the KERN_NPROCS and KERN_MAXPROC sysctl()s and the RLIMIT_NPROC rlimit
count processes instead of threads. New sysctl()s KERN_NTHREADS and KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel variables are replaced by nprocess, maxprocess, nthreads, and maxthread. ok tedu@ mikeb@
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r--sys/kern/kern_proc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 2bf3d8589b1..ad861c8e8af 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_proc.c,v 1.47 2011/09/18 23:20:54 miod Exp $ */
+/* $OpenBSD: kern_proc.c,v 1.48 2012/04/10 15:50:52 guenther Exp $ */
/* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */
/*
@@ -86,9 +86,9 @@ procinit(void)
LIST_INIT(&zombproc);
- pidhashtbl = hashinit(maxproc / 4, M_PROC, M_NOWAIT, &pidhash);
- pgrphashtbl = hashinit(maxproc / 4, M_PROC, M_NOWAIT, &pgrphash);
- uihashtbl = hashinit(maxproc / 16, M_PROC, M_NOWAIT, &uihash);
+ pidhashtbl = hashinit(maxthread / 4, M_PROC, M_NOWAIT, &pidhash);
+ pgrphashtbl = hashinit(maxprocess / 4, M_PROC, M_NOWAIT, &pgrphash);
+ uihashtbl = hashinit(maxprocess / 16, M_PROC, M_NOWAIT, &uihash);
if (!pidhashtbl || !pgrphashtbl || !uihashtbl)
panic("procinit: malloc");