diff options
author | Andrew R. Reiter <arr@FreeBSD.org> | 2002-04-24 20:56:23 +0000 |
---|---|---|
committer | Andrew R. Reiter <arr@FreeBSD.org> | 2002-04-24 20:56:23 +0000 |
commit | d98861bb51765d85a7abbbd3165e993898d94fff (patch) | |
tree | c64f8d32274543b1b28353ca8ed5686516a53412 /sys/netatm/atm_subr.c | |
parent | fa2f91ea5a47faf1882648e1986bd08a74bd50b0 (diff) | |
download | src-d98861bb51765d85a7abbbd3165e993898d94fff.tar.gz src-d98861bb51765d85a7abbbd3165e993898d94fff.zip |
- Turn the atm_stackq_pool into a uma_zone (and change it's name to
atm_stackq_zone).
- Change the related atm_allocate() and atm_free() calls into uma_zalloc()
and uma_zfree() calls.
Notes
Notes:
svn path=/head/; revision=95401
Diffstat (limited to 'sys/netatm/atm_subr.c')
-rw-r--r-- | sys/netatm/atm_subr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c index fc42da60b366..2b8190060096 100644 --- a/sys/netatm/atm_subr.c +++ b/sys/netatm/atm_subr.c @@ -93,13 +93,7 @@ static KTimeout_ret atm_timexp(void *); static struct atm_time *atm_timeq = NULL; static struct atm_time atm_compactimer = {0, 0}; -static struct sp_info atm_stackq_pool = { - "Service stack queue pool", /* si_name */ - sizeof(struct stackq_entry), /* si_blksiz */ - 10, /* si_blkcnt */ - 10 /* si_maxallow */ -}; - +static uma_zone_t atm_stackq_zone; /* * Initialize ATM kernel @@ -136,6 +130,12 @@ atm_initialize() panic("atm_initialize: unable to allocate attributes pool"); 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); + if (atm_stackq_zone == NULL) + panic("atm_initialize: unable to allocate stackq pool"); + uma_zone_set_max(atm_stackq_zone, 10); + register_netisr(NETISR_ATM, atm_intr); /* @@ -747,7 +747,7 @@ atm_stack_enq(cmd, func, token, cvp, arg1, arg2) /* * Get a new queue entry for this call */ - sqp = (struct stackq_entry *)atm_allocate(&atm_stackq_pool); + sqp = uma_zalloc(atm_stackq_zone, 0); if (sqp == NULL) { (void) splx(s); return (ENOMEM); @@ -862,7 +862,7 @@ atm_stack_drain() atm_stackq_head = qnext; if (qnext == NULL) atm_stackq_tail = qprev; - atm_free((caddr_t)sqp); + uma_zfree(atm_stackq_zone, sqp); sqp = qnext; } } while (cnt > 0); |