From owner-p4-projects Tue Apr 30 17: 6:51 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0660937B41A; Tue, 30 Apr 2002 17:06:43 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 448E037B417 for ; Tue, 30 Apr 2002 17:06:42 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4106gI11275 for perforce@freebsd.org; Tue, 30 Apr 2002 17:06:42 -0700 (PDT) (envelope-from arr@freebsd.org) Date: Tue, 30 Apr 2002 17:06:42 -0700 (PDT) Message-Id: <200205010006.g4106gI11275@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to arr@freebsd.org using -f From: "Andrew R. Reiter" Subject: PERFORCE change 10550 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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