summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_usrreq.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-03-20 04:11:52 +0000
committerjeff <jeff@FreeBSD.org>2002-03-20 04:11:52 +0000
commit35c1a726895132831cbeb2b813c7543f02d138e8 (patch)
tree20cf3fa77c83c6c9aae840bd145f1f0739b80ef5 /sys/kern/uipc_usrreq.c
parent318cbeeecf54d416eb936f4bb65c00b18aab686b (diff)
downloadFreeBSD-src-35c1a726895132831cbeb2b813c7543f02d138e8.zip
FreeBSD-src-35c1a726895132831cbeb2b813c7543f02d138e8.tar.gz
Remove references to vm_zone.h and switch over to the new uma API.
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r--sys/kern/uipc_usrreq.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 1df693e..b3ae150 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -59,9 +59,9 @@
#include <sys/jail.h>
#include <sys/sx.h>
-#include <vm/vm_zone.h>
+#include <vm/uma.h>
-static vm_zone_t unp_zone;
+static uma_zone_t unp_zone;
static unp_gen_t unp_gencnt;
static u_int unp_count;
@@ -530,7 +530,7 @@ unp_attach(so)
if (error)
return (error);
}
- unp = zalloc(unp_zone);
+ unp = uma_zalloc(unp_zone, M_WAITOK);
if (unp == NULL)
return (ENOBUFS);
bzero(unp, sizeof *unp);
@@ -578,7 +578,7 @@ unp_detach(unp)
}
if (unp->unp_addr)
FREE(unp->unp_addr, M_SONAME);
- zfree(unp_zone, unp);
+ uma_zfree(unp_zone, unp);
}
static int
@@ -1072,7 +1072,8 @@ next:
void
unp_init(void)
{
- unp_zone = zinit("unpcb", sizeof(struct unpcb), nmbclusters, 0, 0);
+ unp_zone = uma_zcreate("unpcb", sizeof(struct unpcb), NULL, NULL,
+ NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
if (unp_zone == 0)
panic("unp_init");
LIST_INIT(&unp_dhead);
OpenPOWER on IntegriCloud