'\"macro stdmacro
.if n .pH ddi_dki.bp_mapin @(#)bp_mapin	40.5 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} bp_mapin D3DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} bp_mapin D3DK "" "DDI/DKI"
.if \nX=2 .ds x} bp_mapin D3DK "" "\&"
.if \nX=3 .ds x} bp_mapin "" "" "\&"
.TH \*(x}
.IX "\f4bp_mapin\fP(D3DK)"
.SH NAME
\f4bp_mapin\f1 \- allocate virtual address space 
.SH SYNOPSIS
.nf
.na
\f4#include <sys/types.h>
#include <sys/buf.h>
.sp 0.5
\f4vaddr_t bp_mapin(\f4struct buf *\f2bp\f4);\f1
.ad
.fi
.SH ARGUMENTS
.RS 0n 10
.IP "\f2*bp\f1" 10n
Pointer to the buffer header structure.
.RE
.SH DESCRIPTION
The \f4bp_mapin\fP function is used to map virtual address space to
a page list maintaned by the buffer header during a paged-I/O
request.  \f4bp_mapin\f1 allocates system virtual address space,
maps that space to the page list, and returns the offset into the
map.  The offset is stored in the \f4bp->b_un.b_addr\fP field of the
of the \f4buf\fP structure (see \f4buf\f1(D4DK)).  Virtual address
space is then deallocated using the \f4bp_mapout\fP function. 
.P
If a \f4NULL\f1 page list is encountered, \f4bp_mapin\f1 returns
without allocating space and no mapping is performed.
.SH RETURN VALUE
The starting address of the allocated system virtual address space.
.SH LEVEL
Base
.SH SEE ALSO
.na
\f4bp_mapout\f1(D3DK),
\f4buf\f1(D4DK)
.ad
