diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-04-10 15:50:53 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-04-10 15:50:53 +0000 |
commit | e8a9a9f2d6489645bf13279629f174fbbb51e5f2 (patch) | |
tree | 6c4388beca9c54cb18ca390586c38d8057a8a342 /sys/kern/kern_proc.c | |
parent | 213c6b55ddb4168cc2df478c206d9f8db6bfac38 (diff) |
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.c | 8 |
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"); |