Unleashed v1.4
[unleashed.git] / share / man / man9f / bp_mapin.9f
blob594118d57c544cc0c5a3eecc3a96798a9ada2124
1 '\" te
2 .\" Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH BP_MAPIN 9F "Sep 13, 1992"
8 .SH NAME
9 bp_mapin \- allocate virtual address space
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/types.h>
14 #include <sys/buf.h>
18 \fBvoid\fR \fBbp_mapin\fR(\fBstruct buf *\fR\fIbp\fR);
19 .fi
21 .SH INTERFACE LEVEL
22 .sp
23 .LP
24 Architecture independent level 1 (DDI/DKI).
25 .SH PARAMETERS
26 .sp
27 .ne 2
28 .na
29 \fB\fIbp\fR \fR
30 .ad
31 .RS 7n
32 Pointer to the buffer header structure.
33 .RE
35 .SH DESCRIPTION
36 .sp
37 .LP
38 \fBbp_mapin()\fR is used to map virtual address space to a page list maintained
39 by the buffer header during a paged- \fBI/O \fRrequest. \fBbp_mapin()\fR
40 allocates system virtual address space, maps that space to the page list, and
41 returns the starting address of the space in the \fBbp->b_un.b_addr\fR field of
42 the \fBbuf\fR(9S) structure. Virtual address space is then deallocated using
43 the \fBbp_mapout\fR(9F) function.
44 .sp
45 .LP
46 If a null page list is encountered, \fBbp_mapin()\fR returns without allocating
47 space and no mapping is performed.
48 .SH CONTEXT
49 .sp
50 .LP
51 \fBbp_mapin()\fR can be called from user and kernel contexts.
52 .SH SEE ALSO
53 .sp
54 .LP
55 \fBbp_mapout\fR(9F), \fBbuf\fR(9S)
56 .sp
57 .LP
58 \fIWriting Device Drivers\fR