SCO OpenServer
db_read(D3oddi)
db_read --
transfer data from physical memory to a user address
Synopsis
void db_read(struct devbuf *dv, caddr_t va, unsigned count);
Description
db_read transfers data from
physical contiguous memory allocated by the
db_alloc(D3oddi)
function
to a virtual user address.
Arguments
count-
Amount of data, in bytes, to be transferred.
dv-
Pointer to the devbuf structure; see
db_alloc(D3oddi).
va-
User virtual address to which to copy the data.
Return values
None.
Usage
Only use this routine after the requested pages are locked into memory by a
previous call to
physio(D3oddi).
Use of db_read under any other circumstances results in a panic.
Context and synchronization
User
context.
Hardware applicability
All
Version applicability
oddi:
1, 2
Differences between versions
Current drivers that allocate memory with the
getcpages(D3oddi)
function can use the
copyout(D3oddi)
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
copyout(D3)
function to move the data.
References
db_alloc(D3oddi),
db_write(D3oddi),
physio(D3oddi)
Examples
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