diff options
author | arr <arr@FreeBSD.org> | 2002-04-24 18:06:18 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-04-24 18:06:18 +0000 |
commit | 35e5b8d0ded86e3e6e3110408146a376d4717ec1 (patch) | |
tree | 11ccdf99c5d64e678a1c24105661ce23a0e1df1c /sys/netatm/atm_subr.c | |
parent | cb31a822f6f1f927a6992127a595e7eb9727a99e (diff) | |
download | FreeBSD-src-35e5b8d0ded86e3e6e3110408146a376d4717ec1.zip FreeBSD-src-35e5b8d0ded86e3e6e3110408146a376d4717ec1.tar.gz |
- Remove atm_attributes_pool and the relating atm_allocate() and atm_free()
calls associated with the pool and the objects allocated out from the
pool.
- Insert atm_attributes_zone which is a uma_zone that is used just as the
atm_attributes_pool was (including the max objects value). Also, used
the appropriate zalloc and zfree's where necesary.
Diffstat (limited to 'sys/netatm/atm_subr.c')
-rw-r--r-- | sys/netatm/atm_subr.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c index 0581725..fc42da6 100644 --- a/sys/netatm/atm_subr.c +++ b/sys/netatm/atm_subr.c @@ -79,13 +79,7 @@ int atm_print_data = 0; int atm_version = ATM_VERSION; struct timeval atm_debugtime = {0, 0}; -struct sp_info atm_attributes_pool = { - "atm attributes pool", /* si_name */ - sizeof(Atm_attributes), /* si_blksiz */ - 10, /* si_blkcnt */ - 100 /* si_maxallow */ -}; - +uma_zone_t atm_attributes_zone; /* * Local functions @@ -135,6 +129,13 @@ atm_initialize() mtx_init(&atm_intrq.ifq_mtx, "atm_inq", NULL, MTX_DEF); atmintrq_present = 1; + atm_attributes_zone = uma_zcreate("atm attributes", + sizeof(Atm_attributes), (uma_ctor)&atm_uma_ctor, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); + if (atm_attributes_zone == NULL) + panic("atm_initialize: unable to allocate attributes pool"); + uma_zone_set_max(atm_attributes_zone, 100); + register_netisr(NETISR_ATM, atm_intr); /* |