Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man9f / bioinit.9f
bloba302cb608d2f59298713db24f543603ef9472d15
1 '\" te
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 BIOINIT 9F "Nov 20, 1996"
7 .SH NAME
8 bioinit \- initialize a buffer structure
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/ddi.h>
13 #include <sys/sunddi.h>
15 \fBvoid\fR \fBbioinit\fR(\fBstruct buf *\fR\fIbp\fR);
16 .fi
18 .SH INTERFACE LEVEL
19 .sp
20 .LP
21 Solaris DDI specific (Solaris DDI).
22 .SH PARAMETERS
23 .sp
24 .ne 2
25 .na
26 \fB\fIbp\fR\fR
27 .ad
28 .RS 6n
29 Pointer to the buffer header structure.
30 .RE
32 .SH DESCRIPTION
33 .sp
34 .LP
35 The \fBbioinit()\fR function initializes a \fBbuf\fR(9S) structure. A buffer
36 structure contains state information which has to be initialized if the memory
37 for the buffer was allocated using \fBkmem_alloc\fR(9F). This is not necessary
38 for a buffer allocated using \fBgetrbuf\fR(9F) because \fBgetrbuf()\fR will
39 call \fBbioinit()\fR directly.
40 .SH CONTEXT
41 .sp
42 .LP
43 The \fBbioinit()\fR function can be called from any context.
44 .SH EXAMPLES
45 .LP
46 \fBExample 1 \fRUsing \fBbioinit()\fR
47 .sp
48 .in +2
49 .nf
50                 
51 struct buf *bp = kmem_alloc(biosize(), KM_SLEEP);
52 bioinit(bp);
53 /* use buffer */
54 .fi
55 .in -2
57 .SH SEE ALSO
58 .sp
59 .LP
60 \fBbiofini\fR(9F), \fBbioreset\fR(9F), \fBbiosize\fR(9F), \fBgetrbuf\fR(9F),
61 \fBkmem_alloc\fR(9F), \fBbuf\fR(9S)
62 .sp
63 .LP
64 \fIWriting Device Drivers\fR