summaryrefslogtreecommitdiffstats
path: root/sys/netatm/atm_subr.c
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-04-30 07:41:59 +0000
committerarr <arr@FreeBSD.org>2002-04-30 07:41:59 +0000
commit009ce05bfe3bd6bf626b80c1af34ea9d38fb180a (patch)
tree6e7f828a645561d0d508ec079f22a4ec4110db98 /sys/netatm/atm_subr.c
parent984aaf7fe593089d24767a1a307107934367e04f (diff)
downloadFreeBSD-src-009ce05bfe3bd6bf626b80c1af34ea9d38fb180a.zip
FreeBSD-src-009ce05bfe3bd6bf626b80c1af34ea9d38fb180a.tar.gz
- Take advantage of the M_ZERO flag that can now be passed to uma_zalloc.
- Remove atm_uma_ctor() as the M_ZERO will zero out the memory for us.
Diffstat (limited to 'sys/netatm/atm_subr.c')
-rw-r--r--sys/netatm/atm_subr.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c
index 57765f0..edc2b8e 100644
--- a/sys/netatm/atm_subr.c
+++ b/sys/netatm/atm_subr.c
@@ -124,14 +124,14 @@ atm_initialize()
atmintrq_present = 1;
atm_attributes_zone = uma_zcreate("atm attributes",
- sizeof(Atm_attributes), (uma_ctor)&atm_uma_ctor, NULL, NULL, NULL,
+ sizeof(Atm_attributes), NULL, NULL, NULL, NULL,
UMA_ALIGN_PTR, 0);
if (atm_attributes_zone == NULL)
panic("atm_initialize: unable to create attributes zone");
uma_zone_set_max(atm_attributes_zone, 100);
atm_stackq_zone = uma_zcreate("atm stackq", sizeof(struct stackq_entry),
- (uma_ctor)&atm_uma_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
+ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
if (atm_stackq_zone == NULL)
panic("atm_initialize: unable to create stackq zone");
uma_zone_set_max(atm_stackq_zone, 10);
@@ -491,16 +491,6 @@ atm_release_pool(sip)
}
/*
- * Zero fill constructor for our uma_zone's.
- */
-void
-atm_uma_ctor(void *mem, int size)
-{
-
- bzero(mem, size);
-}
-
-/*
* Handle timer tick expiration
*
* Decrement tick count in first block on timer queue. If there
@@ -747,7 +737,7 @@ atm_stack_enq(cmd, func, token, cvp, arg1, arg2)
/*
* Get a new queue entry for this call
*/
- sqp = uma_zalloc(atm_stackq_zone, 0);
+ sqp = uma_zalloc(atm_stackq_zone, M_ZERO);
if (sqp == NULL) {
(void) splx(s);
return (ENOMEM);
OpenPOWER on IntegriCloud