MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                          uiomove(9F)



NAME
     uiomove - copy kernel data using uio structure

SYNOPSIS
     #include 
     #include 



     int uiomove(caddrt address, sizet nbytes, enum uiorw rwflag,
          uiot *uiop);


INTERFACE LEVEL
     Architecture independent level 1 (DI/DKI).

PARAMETERS
     address    Source/destination kernel address of the copy.


     nbytes     Number of bytes to copy.


     rwflag     Flag indicating read or write operation. Possible
                values are UIOREAD and UIOWRITE.


     uiop      Pointer to the uio structure for the copy.


DESCRIPTION
     The uiomove() function copies nbytes of data to or from  the
     space  defined  by  the uio structure (described in uio(9S))
     and the driver.


     The uiosegflg member of the  uio(9S)  structure  determines
     the  type  of  space  to or from which the transfer is being
     made. If it is set to UIOSYSPACE,  the  data  transfer  is
     between   addresses   in   the  kernel.  If  it  is  set  to
     UIOUSERSPACE, the transfer is between a  user  program  and
     kernel space.


     rwflag indicates the direction of the transfer. If  UIOREAD
     is  set,  the  data  will be transferred from address to the
     buffer(s) described by uiop. If UIOWRITE is set, the  data
     will be transferred from the buffer(s) described by uiop to
     address.






SunOS 5.11          Last change: 16 Jan 2006                    1






Kernel Functions for Drivers                          uiomove(9F)



     In addition to moving the data, uiomove() adds the number of
     bytes  moved  to the iovbase member of the iovec(9S) struc-
     ture, decreases the iovlen member, increases the uiooffset
     member of the uio(9S) structure, and decreases the uioresid
     member.


     This function automatically handles page faults. nbytes does
     not have to be word-aligned.

RETURN VALUES
     The uiomove() function returns 0 upon success or  EFAULT  on
     failure.

CONTEXT
     User context only, if uiosegflg is  set  to  UIOUSERSPACE.
     User,  interrupt, or kernel context, if uiosegflg is set to
     UIOSYSPACE.

SEE ALSO
     ureadc(9F), uwritec(9F), iovec(9S), uio(9S)


     Writing Device Drivers

WARNINGS
     If uiosegflg is set to UIOSYSPACE and address is selected
     from user space, the system may panic.



























SunOS 5.11          Last change: 16 Jan 2006                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™