transfer data from physical memory to a user address
void db_read(struct devbuf *dv, caddr_t va, unsigned count);
db_read transfers data from
physical contiguous memory allocated by the
to a virtual user address.
Amount of data, in bytes, to be transferred.
Pointer to the devbuf structure; see
User virtual address to which to copy the data.
Only use this routine after the requested pages are locked into memory by a
previous call to
Use of db_read under any other circumstances results in a panic.
Context and synchronization
Differences between versions
Current drivers that allocate memory with the
function can use the
function to transfer the data.
SVR5 DDI compatibility
This function is not supported in DDI.
Rewrite the driver to use a different memory allocation scheme,
then use the
function to move the data.
The following example shows
how to transfer data from dv to a user buffer:
struct buf *bp;
struct devbuf dv;
db_read( &dv, paddr(bp), bp->b_count );
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005