Date: Tue, 30 Apr 2002 17:06:42 -0700 (PDT) From: "Andrew R. Reiter" <arr@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 10550 for review Message-ID: <200205010006.g4106gI11275@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10550 Change 10550 by arr@arr_shibby on 2002/04/30 17:06:09 - Remove the audit_record_alloc and audit_record_free inlines. - Remove the uma_ctor function and make use of M_ZERO. Affected files ... ... //depot/projects/trustedbsd/audit/sys/kern/kern_audit.c#24 edit ... //depot/projects/trustedbsd/audit/sys/sys/audit.h#15 edit Differences ... ==== //depot/projects/trustedbsd/audit/sys/kern/kern_audit.c#24 (text+ko) ==== @@ -49,9 +49,6 @@ #define AUDLOG "/var/log/audit" -static __inline audit_record_t *audit_record_alloc(uma_zone_t); -static __inline void audit_record_free(audit_record_t *, uma_zone_t); - static struct mtx audit_mtx; static struct audit_record_list record_queue; static uma_zone_t record_zone; @@ -61,22 +58,6 @@ static size_t pool_size = 32; */ -static __inline -audit_record_t * -audit_record_alloc(uma_zone_t zone) -{ - - return(uma_zalloc(zone, 0)); -} - -static __inline -void -audit_record_free(audit_record_t *ar, uma_zone_t zone) -{ - - uma_zfree(zone, ar); -} - audit_record_t * audit_record_init(int type, size_t evsz) { @@ -88,7 +69,7 @@ z = record_zone; mtx_unlock(&audit_mtx); - rec = audit_record_alloc(z); + rec = uma_zalloc(z, M_ZERO); h = &rec->ar_hdr; h->ah_v = AUDIT_VERSION; h->ah_id = audit_id++; @@ -180,7 +161,7 @@ if (ar) { z = record_zone; - audit_record_free(ar, z); + uma_zfree(z, ar); } } } ==== //depot/projects/trustedbsd/audit/sys/sys/audit.h#15 (text+ko) ==== @@ -228,7 +228,6 @@ void audit_write_shutdown(struct vnode *, struct thread *, struct ucred *); int audit_record_write(audit_record_t *); audit_record_t *audit_record_init(int, size_t); -void audit_uma_ctor(void *, int); void audit_write_thread(void *); #endif /* !_SYS_AUDIT_H_ */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205010006.g4106gI11275>