diff options
author | 2002-01-23 15:46:48 +0000 | |
---|---|---|
committer | 2002-01-23 15:46:48 +0000 | |
commit | 0929131739cccefa319bccad922997c6e05c0965 (patch) | |
tree | 353536606dddb26a5227cb8d67b560ceedc24500 /sys/kern/kern_prot.c | |
parent | Use sparc64 fpu_extern.h not sparc. (diff) | |
download | wireguard-openbsd-0929131739cccefa319bccad922997c6e05c0965.tar.xz wireguard-openbsd-0929131739cccefa319bccad922997c6e05c0965.zip |
Allocate rusage, pgrp, ucred and session with pool.
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r-- | sys/kern/kern_prot.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 2652e5fa10d..26262addbe6 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_prot.c,v 1.19 2002/01/12 22:56:55 art Exp $ */ +/* $OpenBSD: kern_prot.c,v 1.20 2002/01/23 15:46:48 art Exp $ */ /* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */ /* @@ -54,6 +54,7 @@ #include <sys/times.h> #include <sys/malloc.h> #include <sys/filedesc.h> +#include <sys/pool.h> #include <sys/mount.h> #include <sys/syscallargs.h> @@ -556,7 +557,7 @@ crget() { struct ucred *cr; - MALLOC(cr, struct ucred *, sizeof(*cr), M_CRED, M_WAITOK); + cr = pool_get(&ucred_pool, PR_WAITOK); bzero((caddr_t)cr, sizeof(*cr)); cr->cr_ref = 1; return (cr); @@ -570,12 +571,9 @@ void crfree(cr) struct ucred *cr; { - int s; - s = splimp(); /* ??? */ if (--cr->cr_ref == 0) - FREE((caddr_t)cr, M_CRED); - splx(s); + pool_put(&ucred_pool, cr); } /* |