SVR5
bp_mapin(D3)
bp_mapin --
allocate virtual address space for buffer page list
Synopsis (Not in current DDI version)
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/ddi.h>
void bp_mapin(struct buf_t *bp);
Description
The
bp_mapin( )
function is used to map virtual address space to
a page list maintained by the
buf(D4)
buffer header
during a paged-I/O request.
Arguments
bp-
Pointer to the buffer header structure.
Return values
None
Usage
A paged-I/O request is identified by the B_PAGEIO flag
being set in the ``b_flags'' field of the buffer header passed
to a driver's
strategy(D2)
routine.
Before calling bp_mapin, the
offset of the location in the first page where the I/O is to
begin is stored in the b_un.b_addr
field of the buf
structure referenced by bp (for strategy routines, this is
done for the driver by the system).
bp_mapin allocates system virtual address space,
maps that space to the page list, and returns the
new virtual address in the b_un.b_addr
field of the buf structure.
This address is the virtual address of the start of the page mappings,
plus the offset given by the original value of bp->b_un.b_addr.
After the I/O completes, the
virtual address space can be deallocated using the
bp_mapout(D3)
function.
B_PAGEIO will not be set
unless the driver has the D_NOBRKUP flag set
in
devflag(D1).
Context and synchronization
User or blockable
context.
Hardware applicability
All
Version applicability
ddi:
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp
Differences beteen versions
This function is replaced by
buf_breakup(D3)
and
biostart(D2)
in DDI 8.
References
bp_mapout(D3),
buf(D4),
devflag(D1),
strategy(D2)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005