2 .\" Copyright (c) 2009 Sun Microsystems, Inc., All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH BIOFINI 9F "Nov 20, 1996"
8 biofini \- uninitialize a buffer structure
13 #include <sys/sunddi.h>
15 \fBvoid\fR \fBbiofini\fR(\fBstruct buf *\fR\fIbp\fR);
21 Solaris DDI specific (Solaris DDI).
29 Pointer to the buffer header structure.
35 The \fBbiofini()\fR function uninitializes a \fBbuf\fR(9S) structure. If a
36 buffer structure has been allocated and initialized using \fBkmem_alloc\fR(9F)
37 and \fBbioinit\fR(9F) it needs to be uninitialized using \fBbiofini()\fR before
38 calling \fBkmem_free\fR(9F). It is not necessary to call \fBbiofini()\fR before
39 freeing a buffer structure using \fBfreerbuf\fR(9F) because \fBfreerbuf()\fR
40 will call \fBbiofini()\fR directly.
44 The \fBbiofini()\fR function can be called from any context.
47 \fBExample 1 \fRUsing \fBbiofini()\fR
51 struct buf *bp = kmem_alloc(biosize(), KM_SLEEP);
55 kmem_free(bp, biosize());
62 \fBbioinit\fR(9F), \fBbioreset\fR(9F), \fBbiosize\fR(9F), \fBfreerbuf\fR(9F),
63 \fBkmem_alloc\fR(9F), \fBkmem_free\fR(9F), \fBbuf\fR(9S)
66 \fIWriting Device Drivers\fR