diff options
author | arr <arr@FreeBSD.org> | 2002-04-20 09:04:58 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-04-20 09:04:58 +0000 |
commit | 6fd993af4daa855d31b38894d75a9664d46f8442 (patch) | |
tree | 88665473c33f37baf651d0f85b191099a65965c8 | |
parent | 2fd5822a297ea775738d73fdf546b517255de547 (diff) | |
download | FreeBSD-src-6fd993af4daa855d31b38894d75a9664d46f8442.zip FreeBSD-src-6fd993af4daa855d31b38894d75a9664d46f8442.tar.gz |
- Create a ``zero fill'' constructor for uma_zcreate's ctor argument.
Inspired by: jake@
-rw-r--r-- | sys/netatm/atm_subr.c | 10 | ||||
-rw-r--r-- | sys/netatm/atm_var.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c index d1e3a05..0581725 100644 --- a/sys/netatm/atm_subr.c +++ b/sys/netatm/atm_subr.c @@ -56,6 +56,7 @@ #include <netatm/atm_stack.h> #include <netatm/atm_pcb.h> #include <netatm/atm_var.h> +#include <vm/uma.h> #ifndef lint __RCSID("@(#) $FreeBSD$"); @@ -488,6 +489,15 @@ atm_release_pool(sip) return; } +/* + * Zero fill constructor for our uma_zone's. + */ +void +atm_uma_ctor(void *mem, int size) +{ + + bzero(mem, size); +} /* * Handle timer tick expiration diff --git a/sys/netatm/atm_var.h b/sys/netatm/atm_var.h index 0064ee3..e6554ea 100644 --- a/sys/netatm/atm_var.h +++ b/sys/netatm/atm_var.h @@ -178,6 +178,7 @@ void atm_initialize(void); void * atm_allocate(struct sp_info *); void atm_free(void *); void atm_release_pool(struct sp_info *); +void atm_uma_ctor(void *, int); void atm_timeout(struct atm_time *, int, void (*)(struct atm_time *) ); int atm_untimeout(struct atm_time *); |