MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                  ddidmanextwin(9F)



NAME
     ddidmanextwin - get next DMA window

SYNOPSIS
     #include 
     #include 



     int ddidmanextwin(ddidmahandlet handle, ddidmawint win,
          ddidmawint *nwin);


INTERFACE LEVEL
     This interface is  obsolete.  ddidmagetwin(9F)  should  be
     used instead.

PARAMETERS
     handle    A DMA handle.


     win       The current DMA window or NUL.


     nwin      A pointer to the next DMA window to be filled  in.
               If  win  is  NUL,  a  pointer to the first window
               within the object is returned.


DESCRIPTION
     The ddidmanextwin() function shifts the current DMA window
     win  within the object referred to by handle to the next DMA
     window nwin. If the current window is NUL, the first window
     within  the object is returned. A DMA window is a portion of
     a DMA object or might be the entire object. A DMA window has
     system  resources  allocated to it and is prepared to accept
     data transfers. Examples of system resources are  DVMA  map-
     ping resources and intermediate transfer buffer resources.


     All  DMA  objects  require  a  window.  If  the  DMA  window
     represents  the  whole  DMA  object  it has system resources
     allocated for the entire data transfer. However, if the sys-
     tem  is  unable to setup the entire DMA object due to system
     resource limitations, the driver writer may allow the system
     to  allocate  system  resources for less than the entire DMA
     object.  This  can  be  accomplished   by   specifying   the
     DIDMAPARTIAL flag as a parameter to ddidmabufsetup(9F)
     or ddidmaaddrsetup(9F) or as part  of  a  ddidmareq(9S)
     structure in a call to ddidmasetup(9F).





SunOS 5.11          Last change: 16 Jan 2006                    1






Kernel Functions for Drivers                  ddidmanextwin(9F)



     Only the window that has resources allocated  is  valid  per
     object  at  any  one time. The currently valid window is the
     one that was most recently returned from  ddidmanextwin().
     Furthermore,  because a call to ddidmanextwin() will real-
     locate system resources to the new window, the previous win-
     dow  will  become  invalid.  It  is  a  severe error to call
     ddidmanextwin() before any transfers into the current win-
     dow are complete.


     The ddidmanextwin()  function  takes  care  of  underlying
     memory  synchronizations  required to shift the window. How-
     ever, if you want to access the data before or after  moving
     the  window, further synchronizations using ddidmasync(9F)
     are required.

RETURN VALUES
     The ddidmanextwin() function returns:

     DISUCES      Successfully  filled  in  the  next  window
                      pointer.


     DIDMADONE     There is no next window. The current window
                      is  the  final  window within the specified
                      object.


     DIDMASTALE    win does not refer to the currently  active
                      window.


CONTEXT
     The ddidmanextwin() function  can  be  called  from  user,
     interrupt, or kernel context.

EXAMPLES
     For an example see ddidmasegtocookie(9F).

ATRIBUTES
     See attributes(5) for a description of the following  attri-
     butes:













SunOS 5.11          Last change: 16 Jan 2006                    2






Kernel Functions for Drivers                  ddidmanextwin(9F)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Stability Level              Obsolete                    
    


SEE ALSO
     attributes(5),                       ddidmaaddrsetup(9F),
     ddidmabufsetup(9F),                   ddidmagetwin(9F),
     ddidmanextseg(9F),                ddidmasegtocookie(9F),
     ddidmasync(9F), ddidmareq(9S)


     Writing Device Drivers








































SunOS 5.11          Last change: 16 Jan 2006                    3



OpenSolaris man pages main menu

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